I've the following dilemma: taken one XML like this:
<book id="$bk102">
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
<genre>Fantasy</genre>
<price>5.95</price>
<publish_date>2000-12-16</publish_date>
</book>
I need to collect all attributes in the XML document beginning with "$" (and replace them with some data I have in memory). The hard part of it is that attributes with "$" can be on any Node of the Document, not just in the id Element like in the example. Is there any magic XPath expression that can make the trick?
Any other Java based solution is welcome.
Thanks in advance