[Zope] XML - Dom object?
Gilles Lenfant
gilles@pilotsystems.net
Sat, 26 Oct 2002 01:50:54 +0200
myxml = """<?xml version="1.0"?>
<mystuff>
...
</mystuff>"""
from xml.dom.minidom import parseString, parse
domtree = parseString(myxml).documentElement
domtree = parse('somefile.xml').documentElement
...
This works with the standard - recent - Python distros and exposes most of
DOM level 1 API.
There are other better or faster DOM parsers available with PyXML or with
4Suite.
--Gilles
----- Original Message -----
From: "Projekt01, Roger Ineichen" <r.ineichen@projekt01.ch>
To: <zope@zope.org>
Sent: Friday, October 25, 2002 8:58 AM
Subject: [Zope] XML - Dom object?
Hello together
Whats the best way for to present a xml document in python like a
dom-object?
No, XSL or Schema needed, just present a xml file for to traverse like a
dom object.
Mit freundlichen Grüssen
Roger Ineichen
___________________________
Projekt01 GmbH
www.projekt01.ch
Langackerstrasse 8
6330 Cham
phone +41 (0)41 781 01 78
mobile +41 (0)79 340 52 32
fax +41 (0)41 781 00 78
email r.ineichen@projekt01.ch
___________________________
END OF MESSAGE
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )