This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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?
 
It's not a secret anymore!