XmlSlurper and textual representation of child elements?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

XmlSlurper and textual representation of child elements?

Szymon Polom
This post has NOT been accepted by the mailing list yet.
While reading XML with XmlSlurper and transforming it into HTML, I want to give some elements a special textual representation in addition to the content.

How can I do it, given the below XML?

<randomText>
  <randomBoldText>
  boldFoo:
  </randomBoldText>
  normalBar
</randomText>

randomText.text() should yield me "<hurraItIsBold>boldFoo:</hurraItIsBold> normalBar".

Any ideas?