read/write XML

Uche Ogbuji uche at ogbuji.net
Mon Aug 9 14:35:46 EDT 2004


Torsten Mohr <tmohr at s.netic.de> wrote in message news:<cej819$ad4$1 at schleim.qwe.de>...
> Hi,
> 
> i just took a look into the python documentation regarding XML.
> XMLDOM look quite big, so i took another look at "minidom".
> 
> So is minidom the preferred way to go to read an XML, handle
> its data and also write XML?

Depends on many other things.

> In the example (13.7.2, SLideshow) the structure seems to be
> read into a "dom", but to check its structure against some
> criteria seems to be completely missing, e.g.:
> 
> - only defined elements used
> - at least one slide in the slideshow
> - others ...
> 
> How can i check a "dom" against these criteria?

You can use DTD, RELAX NG or Schematron.  For DTD use PyXML or
libxml2.  For RELAX NG, use 4Suite, XVIF stand-alone or libxml2.  For
Schematron use Scimitar or an XSLT Schematron implementation.

We can offer more detailed answers if you ask more detailed questions.

-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Decomposition, Process, Recomposition -
http://www.xml.com/pub/a/2004/07/28/py-xml.html
Perspective on XML: Steady steps spell success with Google -
http://www.adtmag.com/article.asp?id=9663
Managing XML libraries - http://www.adtmag.com/article.asp?id=9160
Commentary on "Objects. Encapsulation. XML?" -
http://www.adtmag.com/article.asp?id=9090
Harold's Effective XML -
http://www.ibm.com/developerworks/xml/library/x-think25.html
A survey of XML standards -
http://www-106.ibm.com/developerworks/xml/library/x-stand4/



More information about the Python-list mailing list