Test demonstrates that CDATA sections are valid element content.
<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> ]> <doc><![CDATA[<foo>]]></doc>
Expected result | Actual result for org.dom4j.io.aelfred.SAXDriver |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <char><</char> <char>f</char> <char>o</char> <char>o</char> <char>></char> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/sa/018.xml</systemID> </resolveEntity> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <char><</char> <char>f</char> <char>o</char> <char>o</char> <char>></char> <endElement> <namespaceURI/> <localName/> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |