Hi, I am working on a xml pretty printer. So, I need to reconstruct the DOCTYPE from a dom Document. It seems that setting DocumentBuilderFactory.setExpandEntityReferences(false) does not stop parameter entities from being expanded, so I cannot figure out a way to reconstruct an identical DOCTYPE.
Here's an example: <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" [ <!ENTITY % edgents SYSTEM "edg.ent" > %edgents; ]> Here's the output, when using DocumentType.getInternalSubset() to get the entities: <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd" [ <!ENTITY % edgents SYSTEM 'edg.ent'> <!ENTITY version '3.0.1'> ] > thanks, mike _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]