Look at the SAX sample programs that come with the product. They are pretty
straightforward. Basically, you implement abstract interfaces in a class.
You create an instance of that class and plug it into the SAX parser. The
parser will then call you back for each piece of markup it parses from the
file. You can then use these callbacks to build your data structure.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]



Anand Ravipati <[EMAIL PROTECTED]> on 03/06/2000 12:09:35 PM

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
cc:
Subject:  Re: copying DOM tree



On March 06, 2000 3:00 PM Arnaud Le Hors wrote:
>
> Anand Ravipati wrote:
> >
> > I am using XML4C v3.0.1 for WinNT4 to parse an XML document
> to convert the
> > resulting DOM tree to another tree with a different class
> as a node (i.e
> > DOM_Node in the DOM tree corresponds to My_Node in the new tree).
>
> This seems to be a common misuse of the DOM. Unless you do something
> else with the DOM tree returned by the parser building one is an awful
> waste of time and memory. Instead, you should really build your own
> structure directly from the parser, using SAX.

That seems to be a much better solution atleast from the point of design.
I
do not know much about SAX and the documentation that comes with XML4C is
inadequate.  Are there any other resources that are available which will
help me with programming in SAX?

Thanks.

--
Anand R

> Arnaud  Le Hors - IBM Cupertino, XML Technology Group



Reply via email to