Need help in xml

uche.ogbuji at gmail.com uche.ogbuji at gmail.com
Mon Jul 10 12:09:26 EDT 2006


Kirt wrote:
> i have two xml documemts of type
>
> <job>
>  <jobname>test</jobname>
>  <jobdate>2006-12-12</jobdate>
>  <jobtime>12:12:12</jobtime>
>  <directory>
>   <dirname>/home/</dirname>
>       <file>
>     <name>test2</name>
>     <Modified time>12:12:12</Modified time>
>    </file>
>   </directory>
>  <directory>
>   <dirname>/home/test</dirname>
>    <file>
>     <name>test3</name>
>     <Modified time>12:12:12</Modified time>
>    </file>
>     </directory>
>  </job>
>
> i have to compare 2 similar xml document and get the add, changed and
> deleted files.and write it into acd.xml file.
> can u help me with the python code for this. I am using SAX.

Use the right tool and such problems tend to become much simpler.

http://www.logilab.org/projects/xmldiff

--
Uche Ogbuji                               Fourthought, Inc.
http://uche.ogbuji.net                    http://fourthought.com
http://copia.ogbuji.net                   http://4Suite.org
Articles: http://uche.ogbuji.net/tech/publications/




More information about the Python-list mailing list