"Root element name must match the DOCTYPE name" when parsing correct file
255805Nov 18 2003 — edited Nov 18 2003Hi,
I'm trying to parse the output of an XML creation routine before we send it to the intended recipient.
The XML is built in a CLOB and then the contents of the CLOB 'inserted' into an XMLType variable, and parsed against the appropriate DTD.
I'm getting this error:
"Error occurred while parsing:Root element name must match the DOCTYPE name."
However, if the file is then opened in (eg) XMLSpy, no such error is detected.
The DOCTYPE is 'orders' and the root element of the document being parsed is 'order'. I know the right DTD is being used, because if I cause the XML that's created to be truly invalid, then I get a genuine error such as:
Invalid element 'bad' in content of 'aff', expected elements '[tel, fax, ead]'.
Once genuine errors are fixed, however, I always get this message, even though the file loads and parses correctly in XMLSpy.
Any ideas,
thanks,
Ben
PS Oracle 9i - 9.2.0.4.0