dtd to show alternate sub-nodes?

E

engwar

I'm new to XML and have been given an XML document for which I need to
reverse-engineer a DTD.

There are nodes that have one of two different sets of children. I'm
not sure how to represent this in a DTD. We will have a bunch that
match the first two below, with ChildNode1 and ChildNode2 but then
will have a group that have different child-nodes.

How can I create a dtd to describe this?

Thanks.

<someNode>
<childNode1/>
<childNode2/>
</someNode>

<someNode>
<childNode1/>
<childNode2/>
</someNode>

<someNode>
<childNode3/>
<childNode4/>
</someNode>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top