What namespace do you need when using xdocument to read xml?
Loading
What namespace do you need when using xdocument to read xml?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted Jun 14, 2007, 10:08 AM
Drew TaylorPosted Jun 14, 2007, 9:42 AM
I used System.Xml / System.Xml.XPath but got a node out of range error. I am trying to get a specific node / tag in the xml and display it in a textbox.
Mahesh ChandPosted Jun 14, 2007, 9:32 AM
Here is code snippet:
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.Load(Server.MapPath("MySource.xml"));
System.Xml.Xsl.XslTransform trans = new
System.Xml.Xsl.XslTransform();
trans.Load(Server.MapPath("MyStyle.xsl"));
Xml1.Document = doc;
Xml1.Transform = trans;