Re: Parsing question from a newbie.

Robert Bielik <[email protected]> Thu, 31 Mar 2011 06:30:17 +0200
Newsgroups gmane.text.xml.expat.general
Message-ID <[email protected]>
Thomas, John skrev 2011-03-30 20:38:
> Rob,
>
> Thanks for this info.  So, apparently:
>
> 1)  I must construct and maintain my own context (i.e. expat does not
> provide global context).

Yup.

> 2) The "right" place to DO that might be in the startElement() and
> endElement() routines.

In startElement I think, since its the place where you get the element name first.

> 3) The "right" place to STORE this context would be in my userData
> structure
>          (which I should expanded from the simple pointer to depth that
> is used in the elements.c sample source code.)

Yes.

> 4) In your explanation below when you showed:
>          startElement: "size"
>          valueData: "11.0"
>          endElement: "size"
>     I think you may have meant:
>          startElement: "width"
>          valueData: "11.0"
>          endElement: "width"
>     Would that be correct?

Yes :)

Regards
/Rob