Re: Bug in Oracle org.w3c.dom.Node ?
- From: marvin_123456@xxxxxxxxx
- Date: 24 Aug 2005 23:36:28 -0700
bjf@xxxxxx 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
.
- References:
- Bug in Oracle org.w3c.dom.Node ?
- From: marvin_123456
- Re: Bug in Oracle org.w3c.dom.Node ?
- From: bjf
- Bug in Oracle org.w3c.dom.Node ?
- Prev by Date: Re: Database design issue
- Next by Date: Re: Database design issue
- Previous by thread: Re: Bug in Oracle org.w3c.dom.Node ?
- Next by thread: JDBC vs SQLXML
- Index(es):
Relevant Pages
|
|