Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Nodes with the same name in one XML doc Nodes with the same name in one XML docTo: NULL Date: 11/5/2007 9:26:00 PM How do you created a DTD that will allow for node with the same name at different places in the XML document? Here's my XML <parentNode> <someNode> <myNode/> </someNode> </parentNode> <parentNode> <someOtherNode> <myNode/> </someNode> </parentNode> Here's my dtd <!ELEMENT parentNode (someNode|someOtherNode) <!ELEMENT someNode (myNode)> <!ELEMENT myNode (#PCDATA)> <!ELEMENT someOtherNode (myNode)> <!ELEMENT myNode (#PCDATA)> The problem is that if both of these nodes can have a myNode child node then the application I'm using to validate my XML (Oxygen XML editor) says that my Element type "myNode" must not be declared more than once. I'm new to XML so this is probably easy. Is my dtd really incorrect here? Thanks. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
