compaqr4000
Usenet Archive
- Joined
- Aug 15, 2007
- Messages
- 10
- Reaction score
- 0
Hi
I've just started to maintain someone else's project which uses SAX to parse XML documents. According to the DTD all of the XML elements must be in a specific section. However, 'sometimes' they are not ordered properly and the XML document does not get parsed. The java SAX parser spits out this message:
Element "COMPANY" does not allow "CompanyEvent" here.
I need to change the parser, or the DTD in order to be able to allow parsing.
Here's the part of the DTD showing Company elements:
<!ELEMENT COMPANY (Name, Region?, Employees?, State?, City?, Misc*, CompanyEvent?, Ranking?)>
I'm fairly new to XML, so any thoughts, suggestions are welcome.
Thanks!
Ry
I've just started to maintain someone else's project which uses SAX to parse XML documents. According to the DTD all of the XML elements must be in a specific section. However, 'sometimes' they are not ordered properly and the XML document does not get parsed. The java SAX parser spits out this message:
Element "COMPANY" does not allow "CompanyEvent" here.
I need to change the parser, or the DTD in order to be able to allow parsing.
Here's the part of the DTD showing Company elements:
<!ELEMENT COMPANY (Name, Region?, Employees?, State?, City?, Misc*, CompanyEvent?, Ranking?)>
I'm fairly new to XML, so any thoughts, suggestions are welcome.
Thanks!
Ry