| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Oracle XDK Parser (DOM) for C++ does not copy supplied data in Node::setValue()
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
![]() |
![]() |