You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ana Ateca <aa...@bilbomatica.es> on 2007/03/22 18:08:10 UTC
Xerces problem
To whom it might concern,
We have developed a Java programme using the xercesImpl.jar in order to developed an XML file from data stored in Oracle Database.
In the database, we have normal and HTML text (including HTML tags), both informations should be included in the XML file. When we include HTML text, the class transform the text into XML characters (for example: <BR> changed to <BR<), and we are not interested in this transformation. We would like to maintain the HTML text in the XML file.
An example of the source code uses is:
//Create a XML Document
DocumentBuilderFactory dbFactory = DocumentBuilderFactoryImpl.newInstance();
//dbFactory.setExpandEntityReferences(false);
DocumentBuilder docBuilder = dbFactory.newDocumentBuilder();
xmlDoc = docBuilder.newDocument();
We have been doing some tests including the instruction: dbFactory.setExpandEntityReferences(false); without any result.
Regards,
Ana
Re: Xerces problem
Posted by ke...@us.ibm.com.
>We would like to maintain the HTML text in the XML file.
Don't think of it as text, then; think of it (and build it as) XML document
structure. Note that you will have to use XHTML rather than HTML (or some
approximation of XHTML), or your file will almost certainly be ill-formed
and hence not usable with any XML application.
______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html)