Does anyone know how I can get the current line number of an System.Xml.XmlReader? I am trying to record where in a file I find Xml elements.
+5
A:
Take advantage of the IXmlLineInfo
interface supported by an XmlReader
:
IXmlLineInfo xmlInfo = (IXmlLineInfo)reader;
int lineNumber = xmlInfo.LineNumber;
Daniel LeCheminant
2009-03-07 01:02:18