[
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
child
> 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
case).
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.
Cheers,
Tom P
|