[BangPypers] BangPypers Digest, Vol 22, Issue 1

testing123 test swtest123 at gmail.com
Thu Jun 4 13:00:40 CEST 2009


Hi Venkatraman,

              Yes,My requirement is to compait 2 XML Files are same or not.
Please help me in this regard.

Rgds,
Prasad

On Thu, Jun 4, 2009 at 3:20 PM, <bangpypers-request at python.org> wrote:

> Send BangPypers mailing list submissions to
>        bangpypers at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mail.python.org/mailman/listinfo/bangpypers
> or, via email, send a message with subject or body 'help' to
>        bangpypers-request at python.org
>
> You can reach the person managing the list at
>        bangpypers-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of BangPypers digest..."
>
>
> Today's Topics:
>
>   1. [JOB] UN vacancy for Python Developer (Ashok Hariharan)
>   2. Regarding 2 XML Files Comparision using Python (testing123 test)
>   3. Re: Regarding 2 XML Files Comparision using Python (Venkatraman S)
>   4. Re: Regarding 2 XML Files Comparision using Python (Ruchir Shukla)
>   5. Re: Regarding 2 XML Files Comparision using Python
>      (Anand Balachandran Pillai)
>   6. Re: Regarding 2 XML Files Comparision using Python (Venkatraman S)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 4 Jun 2009 11:59:15 +0300
> From: Ashok Hariharan <ashok at parliaments.info>
> To: bangalore python-ug list <bangpypers at python.org>
> Subject: [BangPypers] [JOB] UN vacancy for Python Developer
> Message-ID:
>        <a245ea580906040159g1f21d904j34924df6c3d9dfaa at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> There is a official United Nations vacancy for a python developer in
> Nairobi (Kenya).
>
> Please click the link below for details (you can apply online on the same
> link).
>
> <
> https://jobs.un.org/Galaxy/Release3/Vacancy/Display_Vac.aspx?lang=1200&VACID=9b6c586f-4cc9-4090-8e20-a81da9c32eb4
> >
>
> Kindly contact me off-list if you need any clarifications or more
> information.
>
> regds
>
> Ashok Hariharan
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 4 Jun 2009 14:59:35 +0530
> From: testing123 test <swtest123 at gmail.com>
> To: bangpypers at python.org
> Cc: xml-sig at python.org
> Subject: [BangPypers] Regarding 2 XML Files Comparision using Python
> Message-ID:
>        <8f7c146d0906040229i2d8a0a46i70a01886d119543d at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
>       I am prasad.I need a help to write a python script to compare two XML
> Files.Is there any tutorial.Should we include any library?Please help me
> How
> to start?
>
> Rgds,
> Prasad
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/bangpypers/attachments/20090604/31dceacd/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 3
> Date: Thu, 4 Jun 2009 15:02:46 +0530
> From: Venkatraman S <venkat83 at gmail.com>
> To: Bangalore Python Users Group - India <bangpypers at python.org>
> Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using
>        Python
> Message-ID:
>        <a3b05e8b0906040232u3998a48dkcc2cd8d2d5403469 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
>  On Thu, Jun 4, 2009 at 2:59 PM, testing123 test <swtest123 at gmail.com
> >wrote:
>
> >        I am prasad.I need a help to write a python script to compare two
> > XML Files.Is there any tutorial.Should we include any library?Please help
> me
> > How to start?
> >
>
> It is a structured document! Please use some basic CS skills.
>
> -V-
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/bangpypers/attachments/20090604/aefe647d/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 4
> Date: Thu, 4 Jun 2009 15:07:45 +0530
> From: Ruchir Shukla <ruchiryshukla at gmail.com>
> To: Bangalore Python Users Group - India <bangpypers at python.org>
> Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using
>        Python
> Message-ID:
>        <a5d829d90906040237m2717dfa6l86611275d54255b6 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> import difflib
> f=open('text1.txt','rb')
> text1=f.read()
> f.close()
> f=open('text2.txt','rb')
> text2=f.read()
> f.close()
> #print text1
> #print text2
> text1_lines = text1.splitlines(1)
> text2_lines = text2.splitlines(1)
> d = difflib.HtmlDiff()
>
> diff = d.make_file(text1_lines, text2_lines)
> print diff
>
>
> To find difference this program and  *"difflib"* library can help you
> HtmlDiff will return the HTML format of the comparison.
>
> if u are looking for output in plain text format then following can help
> you.
>
> import difflib
> d = difflib.Differ()
> diff = d.compare(text1_lines, text2_lines)
>
> On Thu, Jun 4, 2009 at 2:59 PM, testing123 test <swtest123 at gmail.com>
> wrote:
>
> > Hi all,
> >        I am prasad.I need a help to write a python script to compare two
> > XML Files.Is there any tutorial.Should we include any library?Please help
> me
> > How to start?
> >
> > Rgds,
> > Prasad
> > _______________________________________________
> > BangPypers mailing list
> > BangPypers at python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
> >
>
>
> --
> ------------------------------
> Thanking You
> Ruchir Shukla
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/bangpypers/attachments/20090604/f8905c73/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 5
> Date: Thu, 4 Jun 2009 15:13:05 +0530
> From: Anand Balachandran Pillai <abpillai at gmail.com>
> To: Bangalore Python Users Group - India <bangpypers at python.org>
> Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using
>        Python
> Message-ID:
>        <8548c5f30906040243m3986dd09t845d58bb6fc92ac5 at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Thu, Jun 4, 2009 at 3:02 PM, Venkatraman S <venkat83 at gmail.com> wrote:
>
> > On Thu, Jun 4, 2009 at 2:59 PM, testing123 test <swtest123 at gmail.com
> >wrote:
> >
> >>        I am prasad.I need a help to write a python script to compare two
> >> XML Files.Is there any tutorial.Should we include any library?Please
> help me
> >> How to start?
> >
> >
>  What do you want to do while comparing two XML files ? Do you want to
>  validate that both XML files  are the same, i.e result in the same
>  DOM ? Or do you want to compare only some top-level elements ?
>  Give us the context of the problem.
>
>  Please don't CC xml-sig on routine XML programming stuff.
>  You will probably get flamed/charred beyond recognition.
>
>
>
>
> >
> >>
> > It is a structured document! Please use some basic CS skills.
> >
> > -V-
> >
> > _______________________________________________
> > BangPypers mailing list
> > BangPypers at python.org
> > http://mail.python.org/mailman/listinfo/bangpypers
> >
> >
>
>
> --
> -Anand
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/bangpypers/attachments/20090604/4f3c6b3a/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 6
> Date: Thu, 4 Jun 2009 15:20:56 +0530
> From: Venkatraman S <venkat83 at gmail.com>
> To: Bangalore Python Users Group - India <bangpypers at python.org>
> Subject: Re: [BangPypers] Regarding 2 XML Files Comparision using
>        Python
> Message-ID:
>        <a3b05e8b0906040250w21955763tfcac950db04eed7c at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On Thu, Jun 4, 2009 at 3:07 PM, Ruchir Shukla <ruchiryshukla at gmail.com
> >wrote:
>
> > import difflib
> > f=open('text1.txt','rb')
> > text1=f.read()
> > f.close()
> > f=open('text2.txt','rb')
> > text2=f.read()
> > f.close()
> > #print text1
> > #print text2
> > text1_lines = text1.splitlines(1)
> > text2_lines = text2.splitlines(1)
> > d = difflib.HtmlDiff()
> >
> > diff = d.make_file(text1_lines, text2_lines)
> > print diff
> >
> >
> > To find difference this program and  *"difflib"* library can help you
> > HtmlDiff will return the HTML format of the comparison.
> >
> > if u are looking for output in plain text format then following can help
> > you.
> >
> > import difflib
> > d = difflib.Differ()
> > diff = d.compare(text1_lines, text2_lines)
> >
>
>
> Do NOT spoonfeed! *sigh*
>
> -V-
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/bangpypers/attachments/20090604/06fbfb95/attachment.htm
> >
>
> ------------------------------
>
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>
>
> End of BangPypers Digest, Vol 22, Issue 1
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090604/ca4a0f75/attachment-0001.htm>


More information about the BangPypers mailing list