all groups > dotnet xml > november 2003 >
You're in the

dotnet xml

group:

How to determine exact location of error...



How to determine exact location of error... Paul Colton
11/30/2003 9:10:31 AM
dotnet xml: how can my code determine the exact line and column of an XmlNode if I need
to generate and error for that node?


Re: How to determine exact location of error... Oleg Tkachenko
11/30/2003 7:39:24 PM
[quoted text, click to view]

AFAIK XmlDocument doesn't store that information. Usually it's available
via IXmlLineInfo interface, which is implemented by XmlTextReader,
XmlValidatingReader and XPathNavigator (but created by XPathDocument only).
But you can extend XmlDocument to implement IXmlLineInfo interface.
That's exactly what "Extending the DOM" article in .NET Framework
Developer's Guide shows. Here is MSDN link -
ms-help://MS.MSDNQTR.2003JUL.1033/cpguide/html/cpconextendingdom.htm
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog
Re: How to determine exact location of error... Paul Colton
11/30/2003 7:50:22 PM
Thank you! That seems to be what I need.

[quoted text, click to view]

AddThis Social Bookmark Button