Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Oracle XDK Parser (DOM) for C++ does not copy supplied data in Node::setValue()

Oracle XDK Parser (DOM) for C++ does not copy supplied data in Node::setValue()

From: Jonathan <yonig_at_yahoo.com>
Date: 29 Aug 2002 07:26:21 -0700
Message-ID: <b8388a49.0208290626.756383fa@posting.google.com>


Has anyone ever run into this before???
I'm using the Oracle XDK XMLParser, using DOM, in C++. When I update a node's value using Node::setValue(const char* data) - data is not duplicated, that is, the same pointer is used. so if my code does something like this:

// create a text node

Node* text = parser.getDocument().createTextNode(NULL);
// update its value

string s = "hello";
text->setValue(s.c_str());
// at this point the text node's value is "hello"
s = "world";
// at this point the text node's value is "world"...

I can duplicate the string myself, but will the parser free it when it's cleaned???
does anyone know?
thanks,

Jonathan Received on Thu Aug 29 2002 - 09:26:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US