[XML-SIG] Can I use (and How to use) a DOM Validating Reader ...
mcharest@sogetel.net
mcharest at sogetel.net
Mon Oct 10 11:11:27 CEST 2005
Hi,
* I am a beginner with XML processing, so please bear with me !
* I have looked over the Python/XML HOWTO and I am currently reading
Python & XML (Jones & Drake) O'Reilly book. Did not find what I am looking for.
OBJECTIVES:
---------------
* I would like to parse the attached XML file using Python and a simple DOM API, however I would like the following additional features:
a) Use a Validating Reader (I would like to use a DTD at run-time within my application)
b) XML processor to ignore all the trailing line feeds (used to visually format the XML file).
SAMPLE XML FILE:
---------------------
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE casefile SYSTEM "cases.dtd">
<casefile name="data" revision="PA1" date="2005-10-01">
<case date="2005-10-01">
<problem> Find an apartment </problem>
<solution> Use Google </solution>
<outcome> successful </outcome>
</case>
</casefile>
QUESTIONS:
--------------
a) Does PyXML offer a Validating DOM Reader ? (Or, is a Validating Reader
only available for SAX?)
b) Would using a DOM Validating DOM Reader automatically eliminate the
extra trailing line feeds in my DOM object ? If not, how do I get the DOM object
to drop the extra line feeds ?
c) Can I do the above without using the 4Suite XML package ?
Many thanks,
Michel
More information about the XML-SIG
mailing list