Search code examples
c#asp.netxmldocument

How to pass a instance of XmlDocument to argumentTransformList?


I want to pass a XmlDocument to a Xml asp control something like that :

XmlDocument xmlDoc = new XmlDocument();
myXmlControl.TransformArgumentList.AddParam("xml_document_content",xmlDoc.innerXML);

In order to use the parameter in xslt like a node set.

How can I do that?


Solution

  • After many searches I finally use :

    XmlDocument xmlDoc = new XmlDocument();
    object param = xmlDoc.CreateNavigator().Evaluate("/");
    myXmlControl.TransformArgumentList.AddParam("xml_document_content",param );