You keep up with the level. When you get a start element, push the new
element onto the stack, when you get an end element, pop the top level off.
That way, the one on the top of the stack is always the one that the current
incoming content is for.

--------------------------
Dean Roddey
The Charmed Quark Controller
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com

"If it don't have a control port, don't buy it!"


----- Original Message -----
From: "Ing. Hans Pesata" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 20, 2002 8:54 AM
Subject: AW: tree-parsing with SAX2 ???


> Hi !
>
> // install your own stack keeping the track of the nesting levels.
> // Neither one provides this info via standard SAX or SAX2 APIs.
> // Cheers
> //              Radovan
>
> Thanx for your reply !
>
> where do I get the information about the current level from ?
>
> startElement() just gives me the element and its attributes.
> at this point I dont know about the level I am currently in.
>
> Regards,
> Hans Pesata
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to