bjf@gmx.ch schrieb:
> Could you maybe post some code?
Here is an example:
----
String xml = "<a><b>1</b></a>";
DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
fac.setIgnoringElementContentWhitespace(true);
DocumentBuilder builder;
builder = fac.newDocumentBuilder();
Document doc = builder.parse(new InputSource(new StringReader(xml)));
Node n = doc.getElementsByTagName("b").item(0);
n.setTextContent("2");
System.out.println(n.getClass());
System.out.println(n.getTextContent());
----
the output is:
class oracle.xml.parser.v2.XMLElement
12
When I set
System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl");
the output is:
class com.sun.org.apache.xerces.internal.dom.DeferredElementImpl
2
The latter shows the behaviour like in DOM-Api specified.
I am using Java 1.5.
Thanks,
Marvin