External entity: Fatal Error content must consist of well-formed character d 2004-01-15 - By Michael Hüttermann
sorry, my mail client has broken my original mail a bit....once again:
Hello.
I'm very confused and need some help.
I have a main xml document which consists of an external DTD reference. Additionally, a second XML file contains a XML snippet to be included into the first document via an external entity. The entity is defined in an internal subset inside the XML Document. The content of the two files are posted at the bottom. The main document is valid to the DTD, the smaller one is well-formed (I checked with an editor). So far everything is OK. But if I run my java application, xerces throws the following fatal error:
Fatal Error: Parsing XML-Mask file '/C:/.../main.xml' Line 2 The content of elements must consist of well-formed character data or markup.
(comment: line 2 of main.xml consists of the DOCTYPE line).
Any hint to solve that issue would be very appreciated.
Michael
main.xml
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE test SYSTEM "correct_path_to_dtd.dtd" [ <!ENTITY snippet_to_be_included SYSTEM "correct_path_to_snippet.xml"> ]> <test> <tag1> &snippet_to_be_included; <tag2> sldkfj </tag2> </tag1> </test>
----------- snippet.xml
<tag2> shshshsh </tag2>
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|