|
Hi Steen
Good idea.
I've patched the DocumentType so that getText()
should return the text value of the internal DTD subset - in your example this
would be "<!ELEMENT greeting (#PCDATA)>".
I've added 4 classes to the org.dom4j.dtd package
to give a better understanding of the internal DTD subset, there's ElementDecl,
AttributeDecl, InternalEntityDecl, ExternalEntityDecl. These declarations are
available as a List on the DocumentType interface. These classes are
experimental and not heavily tested yet - I'd appreciate any feedback you might
have.
I've added a simple JUnit test case
(org.dom4j.TestDocType) and added your example document to
/xml/dtd/internal.xml. If you pass it into the SAXDemo you should get the same
document back again. e.g.
java SAXDemo
xml/dtd/internal.xml
should parse and output the document
correctly.
I've committed all this to CVS and its available in
the daily build also. James
|
Title: Getting the internal DTD
- [dom4j-user] Getting the internal DTD Steen Lehmann - SilverStream
- Re: [dom4j-user] Getting the internal DT... James Strachan
- Re: [dom4j-user] Getting the interna... James Strachan
