473,401 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

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>
Jul 18 '05 #1
1 1137
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-xm...ers.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"
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.