Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug in Oracle org.w3c.dom.Node ?

 
   Database Forums (Home) -> Java RSS
Next:  JDBC driver conflict with "System.in.read();..  
Author Message
marvin_123456

External


Since: Aug 10, 2005
Posts: 2



(Msg. 1) Posted: Wed Aug 10, 2005 2:11 am
Post subject: Bug in Oracle org.w3c.dom.Node ?
Archived from groups: comp>lang>java>databases (more info?)

Hello,

I am using Oracle 10g for retrieving XML documents as XMLType and
manipulate them in Java, using the method
org.w3c.dom.Node.setTextContent() to set the text child node of a DOM
node. The oracle DOM implementation just appends a child node to the
existing one and does not replace it like it is specified in the
interface documentation of org.w3c.dom.Node

Is this a bug or a feature or am I doing something wrong?

Any help is welcome.

Thank you,
Marvin

 >> Stay informed about: Bug in Oracle org.w3c.dom.Node ? 
Back to top
Login to vote
bjf

External


Since: Aug 24, 2005
Posts: 1



(Msg. 2) Posted: Wed Aug 24, 2005 7:55 am
Post subject: Re: Bug in Oracle org.w3c.dom.Node ? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Could you maybe post some code?

 >> Stay informed about: Bug in Oracle org.w3c.dom.Node ? 
Back to top
Login to vote
marvin_123456

External


Since: Aug 10, 2005
Posts: 2



(Msg. 3) Posted: Wed Aug 24, 2005 11:36 pm
Post subject: Re: Bug in Oracle org.w3c.dom.Node ? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

bjf DeleteThis @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
 >> Stay informed about: Bug in Oracle org.w3c.dom.Node ? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
after Oracle restart - Hi, We're having problems with some jsp apps and an Oracle database. Somebody with priviliges restarted the Oracle service and deleted all rows from a table. Now if we do a manual insert, the row appears in the table, but if we use the import manager....

Geronmio and Oracle -

Oracle database connections - I am testing out Oracle 10g. I have created the database, but I can't seem to set up any driver for odbc. I only know how to set up access db. Does anybody know how to create a connection to an oracle database from java?

Migrating cloudscape 3.6 to oracle. - hello, Presently i am working with Cloudscape 3.6 database, i want to migrate to oracle 9i,please guide me so as that i can migrate to oracle. Thanks & regards Kiran.

Migrating cloudscape 3.6 to oracle. - hello, Presently i am working with Cloudscape 3.6 database, i want to migrate to oracle 9i,please guide me so as that i can migrate to oracle. Thanks & regards Kiran.
   Database Forums (Home) -> Java All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]