I'm looking for a library to help me parse and transform DTDs using Python. The only thing I have found so far is xmlproc, but that seems ancient and doesn't seem to support serialization of DTDs. There's this for Java but I'd prefer a Python solution.
Edit: by "serialization" of DTDs I mean that ideally I'd like to be able to parse the...
I am running xhtml-strict report on a bunch of pages and each time I find a page on a specific page I save it. I need to really look over all the page but what happens is that sometimes the XmlReader is failling but I cannot go on and check the rest of the file to report the errors. I have Eventhandler catching dtd errors when found.
th...
Hi,
Using the DTD validator here, I am informed that the following DTD is invalid.
<!ENTITY % text "(#PCDATA|L)*">
<!ELEMENT H (%text;)+>
<!ELEMENT L (#PCDATA)>
The error message is: "A '(' character or an element type is required within declaration of element type "H"." at line 2, column 22.
Can anyone please point ...
While executing the following code:
doc = builder.parse(file);
where doc is an instance of org.w3c.dom.Document and builder is an instance of javax.xml.parsers.DocumentBuilder, I'm getting the following exception:
Exception in thread "main" java.net.MalformedURLException: unknown protocol: c
at java.net.URL.<init>(Unk...
I want to parse a dtd file and use the info I get from that to create some classes. I know that I can convert it to a xsd and then parse it, but I was hoping to avoid that. Everything I find via google is to validate against a dtd. So I guess my question is: How do I parse a dtd file using c# or are there any tools or libraries out the...