The name reads it all ...
Is it possible to get line / position numbers from System.Xml.XmlNodewhen working with System.Xml.XmlDocument?
I need information so that I can inform the user about where they need to look for certain pieces of information in their Xml file. I saw similar questions related XmlReaderto SO, but nothing answers my question.
I assume that I could look for an xml file for OuterXmlfrom node that interests me, but it seems hacked, and what if this information appears in the file more than once? Should there be a better way?
Update:
I upload my XML file using:
xmlDoc = new XmlDocument();
xmlDoc.PreserveWhitespace = true;
xmlDoc.Load(filename);
source