[jdom-interest] Problem parsing cdata
Guy Lichtman
guy at nomadiq.com
Tue Oct 17 13:02:08 PDT 2000
When running the SAXBuilderDemo if found that it strips out cdata from elements
on the following file:
<?xml version="1.0"?>
<!DOCTYPE Simple [
<!ELEMENT Simple ( VerySimple?, ( MySimple | YourSimple ) )>
<!ELEMENT VerySimple (#PCDATA)>
<!ELEMENT MySimple (#PCDATA)>
<!ATTLIST MySimple type ( MI | MS | IS ) "IS" >
<!ELEMENT YourSimple (#PCDATA)>
]>
<Simple>
<VerySimple>hello</VerySimple>
<MySimple type="IS" />
</Simple>
I get the following output:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Simple>
<Simple>
<VerySimple></VerySimple>
<MySimple type="IS"></MySimple>
</Simple>
I am new to jdom, but it looks like the builder strips out the cdata "hello". Why is this?
and how can i avoid this?
I am using the default xerces parser.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20001017/e7355524/attachment.htm
More information about the jdom-interest
mailing list