You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Pablo Yabo <py...@2vias.com.ar> on 2003/03/11 03:45:04 UTC

CDATA section

Hi,
How can I add a string "<trigger>something</trigger>" in the data section.
When I add the content the library changes the content as this "&lt;Trigger>&lt;/>&lt;/Trigger>".

Pablo

Re: CDATA section

Posted by Pablo Yabo <py...@2vias.com.ar>.
I've got a code fragment:
...
 m_formTarget = new MemBufFormatTarget;

 theSerializer->writeNode(m_formTarget, *m_doc);
 delete theSerializer;

 return (const char *) m_formTarget->getRawBuffer();
}

the document m_doc has CDATA section as this "<![CDATA
<Trigger><None/></Trigger>  ]]>"

and when I get the buffer they are written as: <![CDATA[
&lt;Trigger>&lt;/>&lt;/Trigger>
  ]]>

Pablo


----- Original Message -----
From: "Gareth Reakes" <ga...@decisionsoft.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, March 11, 2003 9:16 AM
Subject: Re: CDATA section


> Hi,
> post the snippet of code where you do this and I will annotate it
> explaining what is going on.
>
> Gareth
>
>
> On Tue, 11 Mar 2003, Pablo Yabo wrote:
>
> > but, I send the tree to a MemBufFormatTarget and then I get the text
with
> > getRawBuffer.
> > How can I get the original document here?
> >
> > Pablo
> > ----- Original Message -----
> > From: "Gareth Reakes" <ga...@decisionsoft.com>
> > To: "xerces" <xe...@xml.apache.org>
> > Sent: Tuesday, March 11, 2003 5:54 AM
> > Subject: Re: CDATA section
> >
> >
> > > Hi,
> > > when the content is serialized xerces will escape < characters in
> > > CDATA as this would make the document illegal. It will remove them
again
> > > when you parse.
> > >
> > > Gareth
> > >
> > >
> > >
> > > On Mon, 10 Mar 2003, Pablo Yabo wrote:
> > >
> > > > Hi,
> > > > How can I add a string "<trigger>something</trigger>" in the data
> > section.
> > > > When I add the content the library changes the content as this
> > "&lt;Trigger>&lt;/>&lt;/Trigger>".
> > > >
> > > > Pablo
> > >
> > > --
> > > Gareth Reakes, Head of Product Development  +44-1865-203192
> > > DecisionSoft Limited
http://www.decisionsoft.com
> > > XML Development and Services
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
>
> --
> Gareth Reakes, Head of Product Development  +44-1865-203192
> DecisionSoft Limited                        http://www.decisionsoft.com
> XML Development and Services
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: CDATA section

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
	post the snippet of code where you do this and I will annotate it 
explaining what is going on.

Gareth


On Tue, 11 Mar 2003, Pablo Yabo wrote:

> but, I send the tree to a MemBufFormatTarget and then I get the text with
> getRawBuffer.
> How can I get the original document here?
> 
> Pablo
> ----- Original Message -----
> From: "Gareth Reakes" <ga...@decisionsoft.com>
> To: "xerces" <xe...@xml.apache.org>
> Sent: Tuesday, March 11, 2003 5:54 AM
> Subject: Re: CDATA section
> 
> 
> > Hi,
> > when the content is serialized xerces will escape < characters in
> > CDATA as this would make the document illegal. It will remove them again
> > when you parse.
> >
> > Gareth
> >
> >
> >
> > On Mon, 10 Mar 2003, Pablo Yabo wrote:
> >
> > > Hi,
> > > How can I add a string "<trigger>something</trigger>" in the data
> section.
> > > When I add the content the library changes the content as this
> "&lt;Trigger>&lt;/>&lt;/Trigger>".
> > >
> > > Pablo
> >
> > --
> > Gareth Reakes, Head of Product Development  +44-1865-203192
> > DecisionSoft Limited                        http://www.decisionsoft.com
> > XML Development and Services
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: CDATA section

Posted by Pablo Yabo <py...@2vias.com.ar>.
but, I send the tree to a MemBufFormatTarget and then I get the text with
getRawBuffer.
How can I get the original document here?

Pablo
----- Original Message -----
From: "Gareth Reakes" <ga...@decisionsoft.com>
To: "xerces" <xe...@xml.apache.org>
Sent: Tuesday, March 11, 2003 5:54 AM
Subject: Re: CDATA section


> Hi,
> when the content is serialized xerces will escape < characters in
> CDATA as this would make the document illegal. It will remove them again
> when you parse.
>
> Gareth
>
>
>
> On Mon, 10 Mar 2003, Pablo Yabo wrote:
>
> > Hi,
> > How can I add a string "<trigger>something</trigger>" in the data
section.
> > When I add the content the library changes the content as this
"&lt;Trigger>&lt;/>&lt;/Trigger>".
> >
> > Pablo
>
> --
> Gareth Reakes, Head of Product Development  +44-1865-203192
> DecisionSoft Limited                        http://www.decisionsoft.com
> XML Development and Services
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: CDATA section

Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
	when the content is serialized xerces will escape < characters in
CDATA as this would make the document illegal. It will remove them again 
when you parse.

Gareth



On Mon, 10 Mar 2003, Pablo Yabo wrote:

> Hi,
> How can I add a string "<trigger>something</trigger>" in the data section.
> When I add the content the library changes the content as this "&lt;Trigger>&lt;/>&lt;/Trigger>".
> 
> Pablo

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org