Issue1337648
Created on 2005-10-25 16:49 by gvanrossum, last changed 2008-01-12 01:14 by gvanrossum.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | Remove |
| parsexml.py | gvanrossum, 2005-10-25 16:49 | parsexml.py | ||
| Messages | |||
|---|---|---|---|
| msg48907 (view) | Author: Guido van Rossum (gvanrossum) | Date: 2005-10-25 16:49 | |
This is a module I developed at Elemental for parsing and unparsing certain simple XML structures. It is licensed to the PSF using the contributor agreement. I expect that it will have to be transmogrified somewhat before it enters the standard library, and we'll need to find a good place for it in the xml package. It also needs docs. I will take care of all that in my spare time. |
|||
| msg48908 (view) | Author: Martin v. Löwis (loewis) | Date: 2005-11-02 04:40 | |
Logged In: YES user_id=21627 There are a number of "simple" APIs out there, such as Fredrik Lundh's ElementTree and Greg Stein's qp_xml, although this is the only one with the notion of a document type. I would encourage to contribute it to PyXML first; it is not clear (to me) that this is somehow a "right" way to do XML processing. For example, it seems limited in the structure of XML content models supported (e.g. no mixed content, no support for preserving the order of child elements). It might be confusing to users if their seemingly simple documents are not properly supported. |
|||
| msg48909 (view) | Author: Guido van Rossum (gvanrossum) | Date: 2005-11-11 03:35 | |
Logged In: YES user_id=6380 Understood. It is very different from ElementTree; I'll have to look at qp_xml. The emphasis of parsexml.py is on converting Python data structures to/from XML, rather than supporting all of XML. What exactly do you mean by contributing to PyXML? Do you mean bring it up on the xml-sig list? |
|||
| msg48910 (view) | Author: Martin v. Löwis (loewis) | Date: 2005-11-13 10:43 | |
Logged In: YES user_id=21627 If your goal is to save arbitrary Python objects, instead of loading arbitrary XML files, then qp_xml is also different, and it is more like David Mertz's gnosis xml pickle, Jörg Rädler's XMarshal, or any other XML pickling library. Contributing to PyXML literally means to submit a patch at http://sourceforge.net/projects/pyxml I should then roll another PyXML release. However, getting feedback from the xml-sig list certainly also is a good idea. |
|||
| msg48911 (view) | Author: Guido van Rossum (gvanrossum) | Date: 2005-11-13 15:24 | |
Logged In: YES
user_id=6380
Actually the goal isn't so much to save *arbitrary* Python
objects but to be able to create objects that on the one
hand correspond to XML (which can be read or written by
other languages -- this was done for a Java/Python
environment) and on the other hand have a "Pythonic"
interface. Thus, both the Python side and the XML side are
constrained. The constraints on the Python side include the
need to explicitly inherit from ElementClass and declare the
XML mapping; there is no support for dicts or tuples and
only limited support for lists. But the result is something
that has a better API quality than the typical DOM or
ElementTree: you can write x.foo instead of
x.someGetMethod("foo").
I will work on contributing to PyXML next, now that I
understand the concept. :-)
|
|||
| msg59767 (view) | Author: A.M. Kuchling (akuchling) | Date: 2008-01-12 00:50 | |
Is this module still of interest? Given that PyXML is no longer being developed or released, the module would need to either go straight into the stdlib, or be released separately. |
|||
| msg59769 (view) | Author: Guido van Rossum (gvanrossum) | Date: 2008-01-12 01:14 | |
I'll just withdraw it. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008-01-12 01:14:28 | gvanrossum | set | status: open -> closed resolution: rejected messages: + msg59769 |
| 2008-01-12 00:50:14 | akuchling | set | type: feature request messages: + msg59767 nosy: + akuchling |
| 2005-10-25 16:49:05 | gvanrossum | create | |