I have a question/request.
Problem:
1. I have XmlDocument/XmlNode from other source/code/webservice/whatever
2. I want the contents to be available to processing in an xslt template.
It seems stupid to iterate an xml document, creating loops, setting tags to provide the data as xml for the xslt-template. Adding xml with setTag escapes the contents.
Any available methods to add the xml to the internal property XmlDocument? If not, I have these suggestions:
var doc = new XmlDocument(); doc.Load(HttpContext.Current.Server.MapPath("/Files/XML1.xml")); var template = new Dynamicweb.Rendering.Template("/Module/test.xslt"); //Suggestion 1: Node is added to the internal property XmlDocument template.SetTag("test", doc.DocumentElement);
//Suggestion 2: Internal property XmlDocument is made public.
XmlNode importnode = template.XmlDocument.ImportNode(doc.DocumentElement, true);
template.XmlDocument.DocumentElement.AppendChild(importnode);
Tn TemplateV2.Template the XmlDocument was accessible...
regards,
Steen