Inserting an element into existing xml file

Anand n.anand.k at gmail.com
Tue Sep 25 12:30:05 CEST 2007


On Sep 25, 3:20 pm, Stefan Behnel <stefan.behnel-n05... at web.de> wrote:
> Anand wrote:
> > I'm new to Python. we are using python2.4.
>
> > I wanted to insert an element into an existing xml file. Can anyone
> > help me with this?
> > I've seen lxml and elementTree in python2.5 has some API's to insert
> > into existing xml file.
> > We cant use python 2.5 due to some limitations. So how can we do it in
> > 2.4?
>
> Install lxml and read the tutorial. It should be easy to grasp, as the API is
> very simple.
>
> http://codespeak.net/lxml/tutorial.htmlhttp://codespeak.net/lxml/tutorial.html#elements-are-lists
>
> It's compatible to ElementTree, which you can also install on Python 2.4 (it's
> what later became part of Python 2.5).
>
> Stefan


Hi Stefan,

First of all thanks for your reply.

I'm Afraid to say, I can't use lxml or elementTree as it requires many
legal approvals and there is high chances of not getting it through.
So Do you have any other method / idea just by using plain 2.4 to
accomplish the task

Cheers,
Anand




More information about the Python-list mailing list