aspose file tools*
The moose likes I/O and Streams and the fly likes split an xml string using xpath? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "split an xml string using xpath?" Watch "split an xml string using xpath?" New topic
Author

split an xml string using xpath?

Mark Lybarger
Ranch Hand

Joined: Dec 19, 2003
Posts: 72
i have a need to split up an xml string. i have string such as (simplified example):

<base>
<item>
<name>foo</name>
</item>
<item>
<name>bar</name>
</item>
</base>

my app needs to process the item(s) in that xml. so i'd like to get a list of the item's as xml, such as: <item><name>foo</name></item>. if i use xpath on the nodes (jaxen), i get a nodelist back. can i use this nodelist to get the xml i need?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: split an xml string using xpath?