DTD validation and xmlproc

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mmm

    DTD validation and xmlproc

    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.xml proc import xmlproc
    from xml.parsers.xml proc import xmlval
    from xml.parsers.xml proc 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.
  • Stefan Behnel

    #2
    Re: DTD validation and xmlproc

    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.





    Stefan

    Comment

    • mmm

      #3
      Re: DTD validation and xmlproc

      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.

      Comment

      Working...