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 Xiaofan Zhou <Xi...@businessobjects.com> on 2004/10/18 17:59:15 UTC
SAX parser - collapse sub elements ?
Hi All,
I have a need to do the following:
Suppose I have an element A that has a sub structures (e.g it has child
elements which could again have child elements), I need my parser to
simply return a string [or a chunk of characters in the character(....)
interface] for the structure of element A (e.g, that is, the whole thing
including all the tags) , I don't want to receive the SAX events for
the subelements. Is there an easy way to do this using the SAX parser
in Xerces? I know I can construct the string myself using all the SAX
events for the subelements, but I thought it might better done inside
the SAX parser.
Thanks in advance.
Frank
Re: SAX parser - collapse sub elements ?
Posted by Gareth Reakes <ga...@parthenoncomputing.com>.
Hi,
I think the easiest way would be to do as you describe - create the
string from the SAX events.
Gareth
Xiaofan Zhou wrote:
> Hi All,
>
> I have a need to do the following:
>
> Suppose I have an element A that has a sub structures (e.g it has
> child elements which could again have child elements), I need my
> parser to simply return a string [or a chunk of characters in the
> character(....) interface] for the structure of element A (e.g, that
> is, the whole thing including all the tags) , I don't want
> to receive the SAX events for the subelements. Is there an easy way
> to do this using the SAX parser in Xerces? I know I can construct the
> string myself using all the SAX events for the subelements, but I
> thought it might better done inside the SAX parser.
>
> Thanks in advance.
>
> Frank
--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org