If by path you mean XPath expression then no. There's no built-in (native)
way to get this although I've seen a few custom work-around solutions (do a
quick search on groups.google.com).
I'd stick with the XmlReader if you can accomplish what you need using a
forward-only reader.As far as alternatives to using XmlReader there are
several although they won't be as performant especially if your documents
are very big.
1. XmlDocument - Allows random direction reading and editing of XML
document. Does load the document into memory.
2. XPathNavigator - Allows random direction reading (no editing) of XML
document. Does load the document into memory.
3. XmlSerializer - Allows XML documents to be converted to objects (or
vice-versa). Once converted to an object you can reference the proper field
or property to get the data.
HTH,
Dan Wahlin
Wahlin Consulting
Microsoft MVP - ASP.NET and XML Web Services
http://www.xmlforasp.net
"Srini" <us****@hotmail.com> wrote in message
news:26****************************@phx.gbl...
Hi,
I am working on a project and a portion of which involves
receiving xml files on internet, extract values to build a
string and pass that string to legacy system.
I am planning on using XMLReader to read passed xml file
and extract values that need to be mapped to string
buffer. However, in this method I am not able to get the
full path (ie., path information from root to this node)
detail of the node. Is there a specific method to get full
path of the node?
Also, is there a alternative to using XMLReader?
Thanks in advance,
Srini