<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have written a simple xml file that includes a
tag with CDATA section. MS Internet Explorer opens the file without any problems
but when I try to build a Document object of this xml file, jdom throws the
following exception:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>----------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>java.io.IOException: Error on line 5 of XML
document: The content of element type "tag" is incomplete, it must match
"(CDATA)".<BR> at
org.jdom.adapters.XercesDOMAdapter.getDocument(XercesDOMAdapter.java:125)<BR>
at
org.jdom.input.DOMBuilder.build(DOMBuilder.java:151)<BR>
at
org.jdom.input.AbstractBuilder.build(AbstractBuilder.java:95)<BR>
at MyDOMBuilder.main(MyDOMBuilder.java:44)</FONT></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial
size=2>----------------------------------------------</FONT></DIV>
<DIV> </DIV>
<DIV>The xml file is given below along with the DTD:</DIV>
<DIV> </DIV>
<DIV>------------------------------------------------------</DIV>
<DIV><?xml version="1.0" encoding="UTF-8"?><BR><!DOCTYPE myxml SYSTEM
"MyDtd.dtd"></DIV>
<DIV><myxml><BR> <tag><![CDATA[ABC &
DEF]]></tag><BR></myxml><BR>------------------------------------------------------</DIV>
<DIV><!ELEMENT myxml (tag+)><BR><!ELEMENT tag
(CDATA)><BR>------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV></BODY></HTML>