Module for converting XML to Python object(s)?

François Pinard pinard at iro.umontreal.ca
Sun Aug 1 18:36:17 EDT 2004


[Robert Oschler]
> Has anybody seen a Python module that will take an XML document (not a
> colossal one), and convert it to a Python nested class object?

You might want to check this announcement:

        From: "Fredrik Lundh" <fredrik at pythonware.com>
        Date: Fri, 18 Jun 2004 17:07:43 +0200
        Subject: ANN: ElementTree 1.2 final (june 18, 2004)
        To: python-announce-list at python.org
        Newsgroups: comp.lang.python.announce

        The Element type is a simple but flexible container object,
        designed to store hierarchical data structures, such as
        simplified XML infosets, in memory.  The ElementTree package
        provides a Python implementation of this type, plus code to
        serialize element trees to and from XML files.

        The 1.2 release adds limited support for XPath and XInclude, and
        also fixes a number of serialization bugs, mostly related to
        extensive use of namespaces and unicode in tags and attribute
        names.  For a complete list of changes, see the CHANGES document
        in the source kit.

        You can get the ElementTree toolkit from:

            http://effbot.org/downloads

        Documentation, articles, and some code samples (including an
        XML-RPC unmarshaller in 16 lines) are available from:

            http://effbot.org/zone/element.htm

        enjoy /F

        --
        http://mail.python.org/mailman/listinfo/python-announce-list

                Support the Python Software Foundation:
                http://www.python.org/psf/donations.html

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard



More information about the Python-list mailing list