Andreas Hartmann pisze:
Hi Cocooners,

I have a SAX stream containing fragments of escaped XML, e.g.

  <p> this is a &lt;a href="..."&gt;link&lt;/a&gt; </p>

and want to convert the characters into SAX events:

  <p> this is a <a href="...">link</a> </p>

I collect and assemble the character events, but I don't know how
to parse the resulting string and generate SAX events without
too much effort.

I tried StringXMLizable and XMLByteStreamInterpreter, but ran
into problems because contentHandler.startElement() is called
or the prolog is not correct.

What's the best way to do this?

TIA for any pointers!

I fear that your only option is to serialize XML, replace all escaped characters and parse it again. Serializing and parsing is really easy even inside transformer.

--
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/

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

Reply via email to