I'm using System.Xml.XmlTextReader the forward-only reader. When debugging, at any time I can check the properties LineNumber
and LinePosition
to see the line number and column number of the cursor. Is there any way I can see any kind of "path" to the cursor with in the document?
For example, in the following HTML document, if the cursor were at *, then the path would be something like html/body/p
. I'd find something like this really helpful.
<html>
<head>
</head>
<body>
<p>*</p>
</body>
</html>
Edit: I'd also like to be able to inspect XmlWriter
similarly.