Version: | 0.50 |
---|---|
Author: | Lars Marius Garshol |
Email: | larsga@ifi.uio.no |
Released: | 18.Jul.98 |
xmlproc is an XML parser written in Python. It is a fairly complete validating parser, but does not do everything required of a validating parser, or even a well-formedness parser. The average user should not run into any omissions, though. Later releases will be more complete.
xmlproc now supports both SGML Open Catalogs and XCatalog 0.1.
xmlproc does not follow the XML specification in these respects:
All other deviations from the specification are unintentional bugs and should be reported to me via email. Hopefully, xmlproc will be 100% compliant in version 1.00.
xmlproc can be used both as a command-line parser and as a parser API you can use to write XML applications.
The command-line parser is in xpcmd.py for well-formedness parsing and xvcmd.py for validating parsing. Currently xpcmd.py only accepts one argument: the URL to the file to parse. (You can use just the file name instead of a full URL if you like.) xvcmd.py allows the "-c" option followed by the URL to a catalog file in front of the document URL. For more details on the catalog file support in xvcmd.py, see the documentation string at the top of the file.
If you want to make a program that gets data from the parser you should subclass the Application class in xmlapp.py. This is a sample xmlproc client:
from xml.parsers.xmlproc import xmlproc
class MyApplication(xmlproc.Application):
pass # Add some useful stuff here
p=xmlproc.XMLProcessor() # Make this xmlval.XMLValidator if you want to validate
p.set_application(MyApplication())
p.parse_resource("foo.xml")
The xmlproc APIs are now documented.
xmlproc is free and you can do as you like with it. If you change it, please let me know.
You can download xmlproc here.
Any and all feedback is welcome, from suggestions for improvements or new features to bug reports. And I really mean it! If you have some opinions on this program, please let me hear them.
To be notified by email when a new version is released, fill out this form. I guarantee that these email addresses won't be used for any other purpose, and that you'll receive notification if the service dies. (If you follow the Python XML-SIG mailing list you won't need to register here since new releases will also be announced there.)