[XML-SIG] python-xml unsupported?

Stefan Behnel stefan_ml at behnel.de
Wed Feb 13 14:13:59 CET 2008


John W. Shipman wrote:
> For me, one of the big payoffs of validating XML files as they
> are input is that it eliminates a lot of error-checking logic
> from my application.  I never have to worry, 'what if this
> attribute is missing or isn't a valid number?'  I can just
> grab the attribute and coerce it with int().

That's why I added parse-time XML-Schema validation support to lxml 2.0,
especially for lxml.objectify. It's the easiest way of making sure the
object structure the parser returns is as expected.


> May I suggest that if there is some validating parser added
> to the library, stick with a basic set of content types that
> cover the vast majority of needs.  Careful applications
> coders will not mind the additional overhead of validating
> the rest.

I think that's how additions to stdlib work (or at least should work) in
general. Batteries included does not mean you also get a free power
socket.

Stefan



More information about the XML-SIG mailing list