Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #96171
| From | dieter <dieter@handshake.de> |
|---|---|
| Subject | Re: XML Binding |
| Date | 2015-09-09 10:20 +0200 |
| References | <8e17ef7d-a08d-42bf-a56c-0a886d620130@googlegroups.com> <9b916796-623d-45d9-abe0-8bc7934ec42b@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.258.1441786885.8327.python-list@python.org> (permalink) |
Palpandi <palpandi111@gmail.com> writes: > Is it better to use pyxb than lxml? > > What are the advantages of lxml and pyxb? "pyxb" has a different aim than "lxml". "lxml" is a general purpose library to process XML documents. It gives you an interface to the document's resources (elements, attributes, comments, processing instructions) on a low level independ from the document type. "pyxb" is different: there, you start with an XML schema description. You use "pyxb" to generate Python bindings for this schema. With such a binding generated, "pyxb" can parse XML documents following a known XML schema into the corresponding binding. The binding objects expose child (XML) elements and (XML) attributes as attributes of the binding object. Thus, the Python interface (as defined by the binding) is highly dependent on the type (aka XML schema) of the document. I use "lxml" for either simple XML processing or when the XML documents are not described by an XML schema. I use "pyxb" when the XML documents has an associated complex schema and the processing is rather complex.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
XML Binding Palpandi <palpandi111@gmail.com> - 2015-09-03 09:54 -0700
Re: XML Binding Burak Arslan <burak.arslan@arskom.com.tr> - 2015-09-03 22:54 +0300
Re: XML Binding Palpandi <palpandi111@gmail.com> - 2015-09-03 22:21 -0700
Re: XML Binding Chris Angelico <rosuav@gmail.com> - 2015-09-04 15:36 +1000
Re: XML Binding Laura Creighton <lac@openend.se> - 2015-09-04 08:46 +0200
Re: XML Binding Laura Creighton <lac@openend.se> - 2015-09-04 08:54 +0200
Re: XML Binding Lorenzo Sutton <lorenzofsutton@gmail.com> - 2015-09-04 10:11 +0200
Re: XML Binding Palpandi <palpandi111@gmail.com> - 2015-09-07 06:42 -0700
Re: XML Binding dieter <dieter@handshake.de> - 2015-09-09 10:20 +0200
Re: XML Binding Stefan Behnel <stefan_ml@behnel.de> - 2015-09-09 11:44 +0200
Re: XML Binding dieter <dieter@handshake.de> - 2015-09-10 08:30 +0200
Re: XML Binding harirammanohar159@gmail.com - 2015-09-09 02:00 -0700
Re: XML Binding Michele Simionato <michele.simionato@gmail.com> - 2015-09-10 23:47 -0700
csiph-web