What are my options for parsing an XML file with XmlDocument and still retain line information for error messages later on? (as an aside, is it possible to do the same thing with XML Deserialisation?)
Options seem to include:
The only other option I know of is XDocument.Load()
, whose overloads accept LoadOptions.SetLineInfo
. This would be consumed in much the same way as an XmlDocument
.