Go Back   Velocity Reviews > Newsgroups > Python
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Python - Re: XML Parsing

 
Thread Tools Search this Thread
Old 02-26-2009, 05:36 AM   #1
Default Re: XML Parsing


Ha the guru himself responding


--- On Wed, 25/2/09, Paul McGuire <> wrote:

> From: Paul McGuire <>
> Subject: Re: XML Parsing
> To: python-
> Date: Wednesday, 25 February, 2009, 2:04 PM
> On Feb 25, 1:17*am, hrishy <hris...@yahoo.co.uk>
> wrote:
> > Hi
> >
> > Something like this
> >

> <snip solution using ElementTree>
> >
> > Note i am not a python programmer just a enthusiast

> and i was curious why people on the list didnt suggest a
> code like above
> >

>
> You just beat the rest of us to it - good example of
> ElementTree for
> parsing XML (and I Iearned the '//' shortcut for
> one or more
> intervening tag levels).
>
> To the OP: if you are parsing XML, I would look hard at the
> modules
> (esp. ElementTree) that are written explicitly for XML,
> before
> considering using regular expressions. There are just too
> many
> potential surprises when trying to match XML tags -
> presence/absence/
> order of attributes, namespaces, whitespace inside tags, to
> name a
> few.
>
> -- Paul
> --
> http://mail.python.org/mailman/listinfo/python-list






hrishy
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parsing INI Files pele Software 0 03-30-2009 04:12 PM
C# condition for xml Parsing kanjali Software 0 03-28-2008 06:01 AM
xslt parsing xml data with '<' invalid character h_q Software 0 01-03-2008 10:00 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46