Hello,

is there a way to tell dom4j to allways create version 1.1 xml documents opposed to version 1.0? DocumentHelper.createDocument() and XMLWriter.write(documentString) allways create 1.0 documents. A system property to set this preference would be expected. Is there an underlying parser that can influance this?

DocumentHelper.parseText seems to create 1.1 version documents just fine when you feed it a string containing a 1.1 document.

The reason I would want this is because I am receiving documents containing custom entities in the form of escaped characters like . XML Version 1.0 does not accept this but 1.1 does. I'm now using a very ugly solution by doing documentString.replace("version=\"1.0\"", "version=\"1.1\"") on the string containing the document just before using DocumentHelper.parsetext(documentString). The escaped characters are handled just fine after that.

Regards,

Robin



------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to