Peter Pimley wrote:


Hello everybody.

I'd like to use digester to parse an XML file. What makes my situation unusual is that sometimes I want to be able to pull in raw XML withing trying to interpret it. My documents are of the form:

<entries>
 <entry>(raw XML data)</entry>
 <entry>(even more data)</entry>
 etc....


All I know about the raw XML data is that it is gaurenteed -not- to contain an </entry> tag. Other than that, your guess is as good as mine, as it comes from the users of my system. It might not even be valid XML. So, I just want to read it in as completely raw data up until the end tag.


My first attempt (I've never used digester before) was to add something like:

digester.addCallMethod ("entries/entry" "doStuff");

... but this didn't work. Typically, the raw XML starts with some start tag of its own, so the <entry> tag has an empty body. The String passed into "doStuff" has zero length.

Is there a way to tell digester to ignore all XML tags from a certain node downwards?

Thanks in advance,
Peter Pimley, Semantico


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




Use a CDATA section in your XML.

Wade


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to