Re: [xml] parsing using SAX

On Thu, Jan 09, 2003 at 09:49:53PM -0500, Adrian Feiguin wrote:
The idea is that each plot type is a plugin, with its own SAXHandler to
parse xml files. So I need the SAXHandler for the project to call the
SAXHandlers of the plugins at each <plot> node to parse each chunk between
<plot> and </plot>, and then come back to parse the rest of the tree. 

To be more specific, in the startElement callback for the project, I find
that my plot is of type "2d". Then I need to call the function to parse
that chunk, the 2d plot with it's own sub-tree, using its own SAXHandler,
and  its own startElement callback, and then come back to parse the rest.

I hope I've been clear, I'd appreciate any help. Thanks a lot!

  What's the problem ? Simply implement the given check in your main
startElement callback and call the appropriate sub-callback when needed
with the exact same input parameters until the matching endElement callback.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]