Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > DTD validation and xmlproc

Reply
Thread Tools

DTD validation and xmlproc

 
 
mmm
Guest
Posts: n/a
 
      04-23-2008
I found Python code to validate a XML document basd on DTD file
layout. The code uses the 'xmlproc' package and these module loading
steps

from xml.parsers.xmlproc import xmlproc
from xml.parsers.xmlproc import xmlval
from xml.parsers.xmlproc import xmldtd

Unfortunately, the xml package no longer seems to hold the xmlproc
module. As a standalone the xmlproc module seems to be no longer
maintained and was subsumed in PyXML a few years ago and that package
is no longer maintained (as best I can tell, or maybe was subsumed in
the base Python 2.x packages)

My problem is I can not get the old xmlproc package files that i did
find to work with Python 2.5.
I am willing to learn and use new xml procedures, but I found nothng
pre-written to validate agaisnt a given DTD file.

Any advice would be welcome, even a good tutorial on XML validation
usiog Python.
 
Reply With Quote
 
 
 
 
Stefan Behnel
Guest
Posts: n/a
 
      04-23-2008
mmm wrote:
> I am willing to learn and use new xml procedures, but I found nothng
> pre-written to validate agaisnt a given DTD file.
>
> Any advice would be welcome, even a good tutorial on XML validation
> usiog Python.


Regarding that part, try lxml.

http://codespeak.net/lxml
http://codespeak.net/lxml/tutorial.html
http://codespeak.net/lxml/validation.html

Stefan
 
Reply With Quote
 
 
 
 
mmm
Guest
Posts: n/a
 
      04-24-2008

> Regarding ... try lxml.
> http://codespeak.net/lxmlhttp://code...alidation.html
>


Thx Stefan, it seems that lxml does everything I need. I have not
figured out all of the bells and whistles but the tutorials are
getting me up to speed. Based 2 days of trial, I can recommend lxml
without reservation.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
docbook and xmlproc Tim Arnold Python 1 01-23-2008 12:29 PM
setDocumentLocator in validating parser (xmlproc) Cees Wesseling Python 2 03-19-2005 09:27 AM
xmlproc maintainer? Alban Hertroys Python 1 03-18-2005 07:10 PM
Removing the dtd name when using print(...) on the dtd generated class Joseph Tilian Java 0 12-21-2004 02:58 PM
xmlproc returning all strings as unicode? Ellinghaus, Lance Python 1 10-10-2003 10:48 PM



Advertisments