[Tutor] xml parsing

lumbricus@gmx.net lumbricus@gmx.net
Thu Nov 21 13:37:06 2002


Hi!

> > little bit of documentation of the re module, I think I may 
> > be able to figure out how to do this for the general situation 
> > if I can come to understand the re module somewhat correctly.

Forget it (sorry).
 
> Sorry, but you won't, regular expressions are the wrong tool for 
> working with any serious level of XML. They don't handle 
> recursive definitions at all well, and will get you tied up 
> in ever increasing knots.

[ snip why not to use res for parsing XML ]
 
> Trust me on this, trying to parse a completly unformatted XML
> file using regular expressions is not something you want to do!

Full ACK.
| My characterisation of using REs for parsing XML is that it
| is like performing brain surgery with a chainsaw: you get the
| job done, but you have to scrape lots of important bits off
| the wall and put them back in where they belong.
|
|        -- Steve Ball

And don't even think about HTML or even validating 
e-mail-addresses. For all these tasks you need a parser.
The good news is the parsers are available :-)
  
> Alan g.

HTH, J"o!


-- 
Wir beschliessen etwas, stellen das dann in
den Raum und warten dann einige Zeit ab, was
passiert. Wenn es dann kein grosses Geschrei
gibt und keine Aufstaende, weil die meisten
gar nicht begreifen, was da beschlossen
wurde, dann machen wir weiter - Schritt fuer
Schritt, bis es kein Zurueck mehr gibt. 
   -- J-C Juncker

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!