XML and Python

?

***

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

Thanks :)

e.g.,
filename: productsandservices.xml
<products>
<name>Computer</name>
<price>500.00</price>
<name2>Keyboard</name2>
<price2>5.00</price2>
</products>
 
L

Lawrence Oluyede

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,663
Latest member
josh5959

Latest Threads

Top