C# - ASP.NET - I need help running a label's text throught the XmlDocument class to convert its te

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
I need help running a labels text throught the XmlDocument class to convert its text to an XML file ..
Below is my code:
<div style="color:Black;background-color:White; <pre>
<span style="color:Blue; string rawXML = xmlResultLabel.Text;
System.Xml.XmlDocument xmldoc = <span style="color:Blue; new System.Xml.XmlDocument();
xmldoc.LoadXml(rawXML);
xmldoc.Save(<span style="color:#A31515; "C:\Users\Administrator\Documents\XMLFILE1.xml");
[/code]

Right now, if I make "rawXML" equal to the actual text, it processes just fine. However, but when I try to set the application to grab my labels value "xmlResultLabel.Text;"
I receive this error:
Line: 5<br/>
Error: Sys.WebForms.PageRequestManagerServerErrorException: Data at the root level is invalid. Line 1, position 1.
Please Help

-JG

View the full article
 
Back
Top