469,625 Members | 1,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Consume XML to pass as a string buffer to legacy

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
Nov 11 '05 #1
1 2191
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

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Ekim | last post: by
7 posts views Thread by SB | last post: by
1 post views Thread by Nattydreadlock | last post: by
3 posts views Thread by bob | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.