Questions tagged [dtd-parsing]
51 questions
6
votes
1 answer
how do i parse a dtd file
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…

scott
- 2,991
- 5
- 36
- 47
5
votes
1 answer
Why am I given the error "StartTag: Invalid element name" when parsing this XML file with a DTD
The document basically has "catalog" as the root tag with child tags of "movie" followed by one or more "actor". Each of these child tags further contains more child tags. I was supposed to make a DTD for this based on some rules given, but it is…

Johnny
- 1,419
- 3
- 13
- 13
5
votes
1 answer
Using JDOM to Parse XML file with external DTD that has not been declared in the XML file
In my XML file I have some entities such as ’
So I have created a DTD tag for my XML document to define these entities. Below is the Java code used to read the XML file.
SAXBuilder builder = new SAXBuilder();
URL url = new…

anonymous
- 2,294
- 5
- 23
- 27
4
votes
1 answer
How to load an inline DTD for use with XDocument?
I have a question regarding how to include a document type definition into an XML file, or from and XML file, that is being loaded into XDocument, in WP7. I have DTD file that is similar to this:

Graham How
- 51
- 1
- 2
- 5
4
votes
1 answer
Parsing a DTD to reveal hierarchy of elements
My goal is to parse several relatively complex DTDs to reveal the hierarchy of elements. The only distinction between DTDs is the version, but each version made no attempt to remain backwards compatible--that would be too easy! As such, I intend to…

kmore
- 924
- 9
- 18
3
votes
1 answer
3
votes
1 answer
Can DTD's be written to allow one or more attributes of any name?
I'm writing a DTD for an XML structure that allows for flexible attribute names, like this:
So here's a…

danieltalsky
- 7,752
- 5
- 39
- 60
3
votes
3 answers
Is it possible to autogenerate Java class from DTD?
I have DTD files of web service, now I need to map database to this web services and I need Java classes to create my entities. But doing this manually from DTD files would be very hard and long process. Is there any tools for this?

newbie
- 24,286
- 80
- 201
- 301
3
votes
2 answers
Hibernate Tools - Not able to add configuration - dom4j connection Timedout -
I created a small project in my company today. In Hibernate Perspective I try to add new configuration so that I can create entities easily from db tables which have several columns. But when I select my project, it gives me…

abhihello123
- 1,668
- 1
- 22
- 38
3
votes
0 answers
How to create xml sample file from dtd by python
I wanna use python to create sample xml from dtd. Don't know beautifulsoup will help

vernomcrp
- 3,459
- 11
- 34
- 44
2
votes
2 answers
Difference between 2 DTD tag
I want to know what is difference between this 2 ELEMENT tag :
and
thanks.

amir amir
- 3,375
- 7
- 26
- 29
2
votes
2 answers
Resolve External Unparsed Entity during parsing with lxml
How can I resolve External Unparsed Entity during parsing with lxml?
Here is my code example:
import io
from lxml import etree
content = b"""\

Laurent LAPORTE
- 21,958
- 6
- 58
- 103
2
votes
1 answer
MalformedURLException with file URI
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"…

Paul Reiners
- 8,576
- 33
- 117
- 202
2
votes
2 answers
Transforming DTD's with Python
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…

oggy
- 3,483
- 1
- 20
- 24
2
votes
1 answer