Skip to content

SAX Parser best practise

2 messages · Jan Hummel, Duncan Temple Lang

#
Thank you Seth  and Duncan for your input!
Yes, a schema is available here
http://psidev.sourceforge.net/ms/xml/mzdata/mzdata.xsd
Informations around mzData xml format are available here
http://psidev.sourceforge.net/ms/#mzdata

Next question I want to come up with: is there a way to validate xml
again a schema or a dtd while parsing using xmlEventParse()?

cheers
	Jan
1 day later
#
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jan Hummel wrote:
Thanks.
I dug around in the libxml code and the Web to verify that validation
is indeed only possible in libxml when one uses DOM (i.e. xmlTreeParse()).
Do you really need to validate the input? Given the size of the source,
it must be created automatically and so I tend to think it is either
correct or not, but that errors will be found with the creation
mechanism.


BTW, there is a new version of the XML package on the Omegahat web site.
It has several new features, including a function to find nodes via
XPath expressions, SAX2 support, recursive support for
xmlElementsByTagName().
- --
Duncan Temple Lang                duncan at wald.ucdavis.edu
Department of Statistics          work:  (530) 752-4782
371 Kerr Hall                     fax:   (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDNLVK9p/Jzwa2QP4RAqNvAJ97+XW1B1AO6zl8ZN2qtVHCcPuu4ACfXnR9
572gL8pD2eMHj/tUSRomZwQ=
=SXBQ
-----END PGP SIGNATURE-----