Hi Benson, On Fri, Apr 30, 2010 at 6:21 PM, Benson Margulies <[email protected]>wrote:
> I don't see how it could be a bug. Any XML parser is permitted to > split these things for it's own convenience, it doesn't change the > infoset. > Then the problem is in the way how we have used the Axiom API. We currently use the following bit of code to extract the text content from an element. Text content is wrapped in a CDATA element. OMNode nodeValue = elem.getFirstOMChild(); String text = ((OMText) nodeValue).getText().trim(); If the CDATA element gets translated into multiple CDATA elements the above code will return the text of the first CDATA element only. Rest of the text is lost. If we use the following code instead things seem to work fine: String text = elem.getText(); Is is ok to use the getText() method as shown above to retrieve CDATA content? Thanks, Hiranya > On Fri, Apr 30, 2010 at 8:48 AM, Hiranya Jayathilaka > <[email protected]> wrote: > > On Fri, Apr 30, 2010 at 3:21 PM, Kasun Indrasiri <[email protected]> > wrote: > > > >> Hi, > >> > >> When parsing XML in non-coalescing mode > ("javax.xml.stream.isCoalescing", > >> false) Axiom breaks down large text entries to multiple chunks. > Therefore > >> CDATA > >> elements with lengthy texts get translated into multiple CDATA elements. > >> > > > > Folks, is this a bug? This behavior is causing some complications with > > Synapse. Any feedback would be highly appreciated. > > > > Thanks, > > Hiranya > > > > > >> > >> thanks, > >> -- > >> Kasun Indrasiri > >> Senior Software Engineer, > >> WSO2 Inc. - "Lean . Enterprise . Middleware" - http://www.wso2.com/ > >> Blog : http://kasunpanorama.blogspot.com/ > >> > > > > > > > > -- > > Hiranya Jayathilaka > > Software Engineer; > > WSO2 Inc.; http://wso2.org > > E-mail: [email protected]; Mobile: +94 77 633 3491 > > Blog: http://techfeast-hiranya.blogspot.com > > > -- Hiranya Jayathilaka Software Engineer; WSO2 Inc.; http://wso2.org E-mail: [email protected]; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com
