Amal Sirvisetti a écrit :
>
> Hi,
>
> I have implemented an XMLFragment class based on the AbstractXMLFragment
> in C2 (dev-2.1). Within the toSAX() method I call another Java class
> that returns me an XML string. I want to insert this string into the XSP
> page. However, when I call the hander.characters(...) method, the < and
> > signs are getting converted to < and > respectively and the XML
> document strcuture is not preserved. Is there an easy way to handle
> this? Or, do I need to parse the incoming string and prepare the XML
> again using the startElement and endElement methods?
>
> Please advise.
>
> Thanks,
> Amal
> Sirvisetti Systems
>
The characters() method in ContentHandler is used to output...
characters. That's why "<" and ">" are escaped to < and >
To achieve the desired behaviour, you need to pass your XML-in-a-String
through a parser that outputs SAX events into the ContentHandler
parameter of toSAX().
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>