editing XML via DOM

Discussion in 'Python' started by jaco, Dec 20, 2004.

  1. jaco

    jaco Guest

    Hi,

    I'm new to Python and XML but still I want to create something that
    includes creating and editing XML using Python.

    Now I'm looking for a little example program that does (some of) this to
    set me on my way.

    Is there something like this available or can somebody give me some
    example lines that creates and saves some XML data?

    Cheers,
    Jaco
    jaco, Dec 20, 2004
    #1
    1. Advertising

  2. On Mon, 20 Dec 2004 21:45:14 +0100, jaco <> wrote:
    > Hi,
    >
    > I'm new to Python and XML but still I want to create something that
    > includes creating and editing XML using Python.
    >
    > Now I'm looking for a little example program that does (some of) this to
    > set me on my way.
    >
    > Is there something like this available or can somebody give me some
    > example lines that creates and saves some XML data?


    I use a really forgiving XML library called 'microdom' that resides in
    the twisted library. I won't give an example of that - but I do
    recommend it if you have a situation where you need to parse crappy
    xml.

    A quick google comes up with:

    http://www.acooke.org/andrew/writing/python-xml.html
    which shows how to use xml.dom.ext.reader.Sax.FromXmlFile and then
    doing some stuff with createElement, appendChild and
    getElementsByTagName.

    Regards,
    Stephen Thorne
    Stephen Thorne, Dec 21, 2004
    #2
    1. Advertising

  3. jaco

    Uche Ogbuji Guest

    jaco wrote:
    > Hi,
    >
    > I'm new to Python and XML but still I want to create something that
    > includes creating and editing XML using Python.
    >
    > Now I'm looking for a little example program that does (some of) this

    to
    > set me on my way.
    >
    > Is there something like this available or can somebody give me some
    > example lines that creates and saves some XML data?


    Start with:

    http://www.xml.com/pub/a/2002/11/13/py-xml.html

    then see:

    http://www.xml.com/pub/a/2003/10/15/py-xml.html

    Overall, there is a lot on DOM throughout the series:

    http://www.xml.com/pub/at/24


    --
    Uche Ogbuji Fourthought, Inc.
    http://uche.ogbuji.net http://4Suite.org http://fourthought.com
    Use CSS to display XML -
    http://www.ibm.com/developerworks/edu/x-dw-x-xmlcss-i.html
    Full XML Indexes with Gnosis -
    http://www.xml.com/pub/a/2004/12/08/py-xml.html
    Be humble, not imperial (in design) -
    http://www.adtmag.com/article.asp?id=10286UBL 1.0 -
    http://www-106.ibm.com/developerworks/xml/library/x-think28.html
    Use Universal Feed Parser to tame RSS -
    http://www.ibm.com/developerworks/xml/library/x-tipufp.html
    Default and error handling in XSLT lookup tables -
    http://www.ibm.com/developerworks/xml/library/x-tiplook.html
    A survey of XML standards -
    http://www-106.ibm.com/developerworks/xml/library/x-stand4/
    The State of Python-XML in 2004 -
    http://www.xml.com/pub/a/2004/10/13/py-xml.html
    Uche Ogbuji, Dec 24, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    534
  2. Replies:
    0
    Views:
    572
  3. Replies:
    3
    Views:
    519
    Stefan Behnel
    Aug 3, 2007
  4. Alan
    Replies:
    6
    Views:
    1,568
  5. elsigh
    Replies:
    3
    Views:
    199
    elsigh
    Jul 23, 2006
Loading...

Share This Page