[lxml-dev] About objectify

David Soulayrol dsoulayrol at free.fr
Tue Jan 22 15:45:53 CET 2008


Le mardi 22 janvier 2008 à 14:54 +0100, jholg at gmx.de a écrit :
> Hi David,
> 
> > Does anyone have a simple example with a short XML file containing
> > some
> > elements, its schema, and the python code parsing the file using
> > objectify with the xsi namespace to do type association ?

> I'm not quite sure I understand what you try to achieve,
> 
> but lxml.objectify does not necessarily need a schema:

Hello.

Thanks for your answer.

I should have written I'd like to define a complex type, as stated in
the end of the following chapter.

http://codespeak.net/lxml/objectify.html#how-data-types-are-matched

In my case, writing a type checker would be impossible - or very
difficult. I understand I can also use a py:pytype attribute, but I'd
like to try the xsi namespace if possible.

-- 
David.



More information about the lxml-dev mailing list