So far, I’ve been experimenting around quite a bit, and tried to
build myself a method which should return an XpathDocument
for later transformation.
public XPathDocument GetXPathDocFromQuery(string collection, string queryString)
{
TaminoQuery query = new TaminoQuery(queryString);
TaminoConnection con = new TaminoConnection(this.url);
con.Open(TaminoConnectionMode.AutoCommit);
TaminoCommand cmd = con.CreateCommand(collection);
XmlReader reader = cmd.QueryReader(query);
XPathDocument xpathDoc = new XPathDocument(reader);
return xpathDoc;
}
And later the following transformation with the xpathDoc I get from the method above.
public string Dom_XSLT(XPathDocument xpathDoc, XslCompiledTransform xslt)
{
StringWriter outWriter = new StringWriter();
xslt.Transform(xpathDoc, null, outWriter);
string outString = outWriter.ToString();
return outString;
// xslTransform.Transform(xpathDoc, null);
}
The returned string I use to output directly on a webpage. Still, I am
getting my XSLT from a file. Later, I want to store XSLT in Tamino too,
and get these files out there in a similiar way.
Fact is, that if I get BOTH the XML and XSLT from a file this way
string strXMLFile = Server.MapPath(@"XML\taxonomie.xml");
XPathDocument xpTaxonomie = new XPathDocument(strXMLFile);
The transformation works perfectly. It still does not work at all if I try
to get the XPathdocument out of the Database directly.
I still don’t have the slightest idea how to fix this…
I just want to get out parseable XML and XSLT files stored in tamino,
Does anybody who did this before have a clue? :?
#webMethods-Tamino-XML-Server-APIs#webMethods#API-Management