• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

split an xml string using xpath?

 
Mark Lybarger
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic