Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #96242

Re: XML Binding

Path csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'resulting': 0.04; 'schema': 0.05; 'api': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'attributes,': 0.16; 'instantiate': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:XML': 0.16; 'toolbox': 0.16; 'element': 0.18; 'stefan': 0.18; 'stick': 0.18; '(in': 0.18; '>>>': 0.20; 'library': 0.20; 'class,': 0.22; 'defined': 0.23; 'xml': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:" 20': 0.26; 'skip:( 20': 0.28; 'interface': 0.29; 'objects': 0.29; 'that.': 0.30; 'class': 0.33; 'similar': 0.33; 'gives': 0.35; 'quite': 0.35; 'level': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'itself': 0.38; 'data': 0.39; 'resources': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'received:de': 0.40; 'your': 0.60; 'different': 0.63; 'you.': 0.64; 'binding': 0.66; 'received:217': 0.66; 'advantages': 0.72; 'construction': 0.72; 'special': 0.73; 'low': 0.83; 'tree,': 0.84; 'way)': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: XML Binding
Date Thu, 10 Sep 2015 08:30:52 +0200
References <8e17ef7d-a08d-42bf-a56c-0a886d620130@googlegroups.com> <9b916796-623d-45d9-abe0-8bc7934ec42b@googlegroups.com> <87r3m8q9zz.fsf@handshake.de> <msov16$166$1@ger.gmane.org>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Gmane-NNTP-Posting-Host pd9e09977.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:OV2XX2JBMSci0tBdoUAcwAjOrQw=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.308.1441866683.8327.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1441866683 news.xs4all.nl 23791 [2001:888:2000:d::a6]:58020
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:96242

Show key headers only | View raw


Stefan Behnel <stefan_ml@behnel.de> writes:

> dieter schrieb am 09.09.2015 um 10:20:
>> Palpandi 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.
>
> lxml's toolbox is actually larger than that. There's also lxml.objectify
> which provides a Python object interface to the XML tree, similar to what
> data binding would give you. And you can stick your own Element object
> implementations into it if you feel a need to simplify the API itself
> and/or adapt it to a given document format.
>
> http://lxml.de/objectify.html

This is nice - but still quite far from the schema support of "pyxb".

The "pyxb" binding generation generates a Python class for each type
defined in the schema. You just instantiate such a class, populate
the resulting object (in the normal Python way) and either use
it in the construction of larger objects or serialize it as XML -- no
need to worry about special construction ("objectivity.DataElement",
"objectivity.SubElement", ...), no need to worry about xml namespaces.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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