Groups | Blog | Home
all groups > dotnet xml > january 2007 >

dotnet xml : Using the WebControls.Xml control



Chris
1/31/2007 2:25:23 PM
I am using the WebControls.Xml control to render some xml from a memory
stream using an xsl file from disk.

It seems to be doing everything now but rendering the xml. (slight detail)
When I execute the following, I see that my XSL was used to display some
hard coded stuff but the XML was never processed.

Does anyone see what I am missing here?

// Xml1 is a WebControls.Xml control

System.IO.MemoryStream memstream = new System.IO.MemoryStream() ;

MyDataView.ToTable().WriteXml(memstream);

memstream.Position = 0;



XPathDocument oXPathDocument = new XPathDocument(memstream);




this.Xml1.XPathNavigator = oXPathDocument.CreateNavigator();

this.Xml1.TransformSource = "~/XSL/MyStylesheet.xsl" ;



TIA,

Chris





Chris
1/31/2007 4:32:01 PM
I found the answer to this one.
Everything works fine. My document element was not what I expected it to be
so the xsl did not process things correctly.


[quoted text, click to view]

AddThis Social Bookmark Button