Subject: | Wanted: hook for filtering input data |
Let's assume we have the following input XML data
---------------->8=====================
<foo>
<bar>asdf</bar>
<baz>qwer</baz>
<quux>True</quux>
<quuux>False</quuux>
</foo>
=======================8<--------------
I'd love to have an input filter where I can change the content of <quux> elements, preferably with a callback function I supply. (In the example above, it might make sense to make the content more Perlish (eg for numeric comparison) by offering a callback method that checks if the element name is qr/quuu?x/i and then replace the related content with 0 or 1 depending on what it was originally).
I'll leave it up to you to figure out some details; Maybe it's sensible to make use of some xpath fun? Dunno.