XmlTextReader and wrong LinePosition results

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi,
Im reading an XML file using XmlTextReader , for each node Im querying the IXmlLineInfo for Line number and position.
When my XML file only contain spaces all reported well ,BUT when my XML file contain also tab character then the XmlTextReader reports different result from the line that only contain spaces

Any idea how to solve this issue ?
Thanks,
Oren.

e.g :

<Xml>
<xs:element name="oren"/> ------------------------------------------> This report as line position 8
<span style="white-space:pre <xs:element name="oren"/> ------------------------------------------> This report as line position 2
</Xml> <hr class="sig Oren

View the full article
 
Back
Top