468,305 Members | 1,463 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,305 developers. It's quick & easy.

Recommended validating XML parser?

We're looking for a current, supported, validating XML parser. Since it
seems like there are a few thousand out there, I though we'd see what
everyone else is using.

Bonus points if it can do something like:
>>foo = XMLParser("""
<xml>
<weight>3000</weight>
</xml>
""", dtd=file('/etc/weightfile.dtd'))
>>print foo.weight
3000

....or some variant on that theme.
--
Kirk Strauser
May 7 '07 #1
1 1001
Kirk Strauser wrote:
We're looking for a current, supported, validating XML parser. Since it
seems like there are a few thousand out there, I though we'd see what
everyone else is using.
You are asking for lxml, right?

http://codespeak.net/lxml/

Bonus points if it can do something like:
>>foo = XMLParser("""
<xml>
<weight>3000</weight>
</xml>
""", dtd=file('/etc/weightfile.dtd'))
>>print foo.weight
3000

...or some variant on that theme.
Not currently supported, only document internal DTD references are used. But
you can always validate the document *after* parsing, be it with DTD,
XMLSchema or RNG.

BTW, adding this would be straight forward. The implementation is there, it's
just not available at the API level (and I'm not sure enough how it should
look like...)

Stefan
May 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by jmb | last post: by
2 posts views Thread by Benjamin Niemann | last post: by
2 posts views Thread by Cees Wesseling | last post: by
reply views Thread by jean-gert nesselbosch | last post: by
2 posts views Thread by srujana | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.