System.Xml.XmlException: '0' is an unexpected token. ?
Hello,
In my UI automation, I have a code which gets me the inner HTML of the page. I save that in a string variable strXml. When I do a View source of that page.... the HTML is well-formed and has all the tags and double quotes etc..... as shown below:
====================================================================================
<TBODY>
<TR>
<TDheight="1%">
<TABLEstyle="TABLE-LAYOUT: fixed"cellSpacing="0"cellPadding="3"width="100%"valign="top">
<COLGROUP>
<COLwidth="115">
<COL> etc etc etc....
====================================================================================
BUT, when I am debugging using Visual Studio for this variable strXml it shows some extra characters on it as shown below...
====================================================================================
<tbody>\r\n<tr>
\r\n
<tdheight="\"1%\">\r\n
<tablestyle="\"table-layout:fixed\"cellspacing="0"cellpadding="3"width="\"100%\"valign="\"top\"=======================================================================================
so, when I am using this string in my XMLDOCUMENT to LoadXML it throws an Xml.XmlException saying what I dont understand is that why is it adding \r\n and "\ and how can I preserve the format... I did a View Source and found that all the tags are ended and all attributes are enclosed by "
FAILURE: Unhandled Exception: System.Xml.XmlException: '0' is an unexpected token. The expected token is '"' or '''. Line 4, position 48.which is for CELLSPACING Tag above.....
Thanks!
KRSNA

