Hello,
I just tried to get an XML out of tamino in order to later transform it
via XSLT to html. First, to get the XML via query, I tried following
code:
TaminoDataAdapter adapter = new TaminoDataAdapter(this.url, collection);
adapter.Behavior = TaminoAdapterBehavior.ReadOnly;
TaminoDataAdapter adapter = new TaminoDataAdapter(this.url, collection);
adapter.Behavior = TaminoAdapterBehavior.ReadOnly;
DataSet ds = new DataSet();
TaminoQuery tamQuery = new TaminoQuery("input()" + query);
int count = adapter.Fill(ds, tamQuery);
XmlDocument xdoc = new XmlDocument();
ds.WriteXml("c:/test.xml");
xdoc.LoadXml(ds.GetXml());
This fills a dataadapter, which contens is later returned as an XmlDocument.
So far, this is working. But the problem is, that the Xml-document
is not in its original form, it looks like this:
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? :?
It is possible that you may be better off inserting/retrieving complete XML documents. The following link should help with this. It is normally best if you assign a document name for your documents. You will also need to provide schemas for the documents too - unless you use the ino:etc collection (which is only recommended for test purposes).