OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Python/XML parsing

[ Lists Home | Date Index | Thread Index ]

[Donald Traboini]

> Hi, I am a beginner in XML and Python as well and I am trying to learn as
> much as possible by writing some examples myself. I created a very simple
> xml file with just one element.  Then I loaded the file into the DOM tree
> using the 4DOM parser. Once the it was loaded, I appended a couple of
> elements to the root. This was all fine, but when I went back to the xml
> file nothing was updated. Isn't the xml file supposed to be updated
> automatically from the DOM tree? If not, what I do have to do to see the
> changes?

No, once the processor has processed the file, it is done with the file.
There would be no further connection with the file unless you wrote some
code to maintain a connection.  That would be very hard (for a general

If by "see changes" you mean to load an xml file into an editor and look at
its contents, then you have to serialize the in-memory data (a DOM in this
case, right?)  to a file.


Tom P


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS