Re: [xml] sax2 interface



Thanks for the tips,
  I plan to use the SAX2 interface for the actually schema2c, but the
  code it produces will actually use the tree module/interface that i've
  used before?  As far as validation the code will actually validate
  against the schema before parsing with the xmlschemas interface, but
  that will require another external file after the code has been
  produced and i wanted to sort of get away from that... so before i
  start the rewrite i'm going to explore the path of embedding the
  schema stuff in the parsing somehow.

On 2004-01-21 05:00:40, Daniel Veillard wrote:
On Tue, Jan 20, 2004 at 01:16:08PM -0500, Everett Coleman II wrote:
I was building a schema to c application (sort of like flexml
http://flexml.sourceforge.net; but with a schema as opposed to a dtd).
it currently uses lex/yacc for the xml parsing and i'm currently running
into problems that libxml2 already handles.  To get to the point, I'm
going to dump the whole lex/yacc idea and use libxml2 and if i could get
some examples of how to use the SAX2 api, that would be very useful.

  Is parsing performances really key in your application ? If not
I would suggest using the xmlReader interface instead. If yes, then
you can get a basic example from the testSAX.c program found in the
sources, check the changes introduced by the --sax2 option to be sure
to use the SAX2 interfaces and not SAX1.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


-- 
+--------------------------------------------------+
|Everett Coleman II                                |
|http://ctech.fuzzyneural.net                      |
|                                                  |
|GnuPG Fingerprint:                                |
|E233 546E ED79 1D29 1D9D  04F0 DA5B 10F6 3FD3 DD12|
+--------------------------------------------------+

Attachment: signature.asc
Description: Digital signature



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