XML and Python

Lawrence Oluyede raims at dot.com
Tue Jul 20 09:19:16 CEST 2004


In data Mon, 19 Jul 2004 23:12:54 -0700, *** ha scritto:

> Does Python support XML like VB.NET does? If it does, could someone
> provide a link or example code.
> 
> Thanks :)

VB.NET does not support XML (MSR's C-omega does), .NET has support for it.
Anyway, the Python standard library has some (quite enough for many things)
support for XML parsing and the creation of XML DOMs, so you can represent
a DOM Level 2 with xml.dom
(http://docs.python.org/lib/module-xml.dom.html), a light-weight DOM (Level
1) with xml.dom.minidom
(http://docs.python.org/lib/module-xml.dom.minidom.html), use expat based
parser for fast parsing
(http://docs.python.org/lib/module-xml.parsers.expat.html) or use SAX
(http://docs.python.org/lib/module-xml.sax.html) and much more. The SAX
parser is similar to XmlTextReader in .NET except that SAX is a push
parser, XmlReaders are pull parsers.

Your second option is to take a look at what third parties offer to
you...something like full PyXml, libxml2 bindings, 4Suite, xmltramp and so
on... for an overview see these articles:

http://www.xml.com/pub/au/84

Bye

-- 
Lawrence
"In IE we trust"



More information about the Python-list mailing list