DOM Parser isn 't creating EntityReference Nodes 2003-01-07 - By Luke_Burnham@(protected)
I'm using JAXP 1.1's DocumentBuilder and Xerces 2.2 to load an XML string into a DOM. A simple example string is: <page><</page>.
When I examine the DOM structure in my debugger, I see an Element node with a single child Text node that contains the resolved entity reference text - in this case the single character '<'. What I want to see is an Element node with an EntityReference node child and subtree.
If I substitute the Crimson parser for Xerces, I can toggle between these two modes using the docBuilderFactory.setExpandEntityReferences(boolean) method, but this method appears to have no effect on Xerces.
What am I doing wrong?
- Luke -
<br><font size=2 face="sans-serif">I'm using JAXP 1.1's DocumentBuilder and Xerces 2.2 to load an XML string into a DOM. A simple example string is: < ;page>&lt;</page>.</font> <br> <br><font size=2 face="sans-serif">When I examine the DOM structure in my debugger, I see an Element node with a single child Text node that contains the resolved entity reference text - in this case the single character '<'. What I want to see is an Element node with an EntityReference node child and subtree.</font> <br> <br><font size=2 face="sans-serif">If I substitute the Crimson parser for Xerces, I can toggle between these two modes using the docBuilderFactory .setExpandEntityReferences(boolean) method, but this method appears to have no effect on Xerces.</font> <br> <br><font size=2 face="sans-serif">What am I doing wrong?</font> <br> <br><font size=2 face="sans-serif">- Luke -</font>
|
|