Re: DOM nodeValues: char* to string

2003-03-27 Thread Andreas B. Thun
Ooops! I get a core dump when calling getNodeValue() static string getNodeValue(DOMNode *node) { char*chNodeValue; const XMLCh *nodeValue; string str; if (node) { nodeValue = node->getNodeValue(); chNodeValue = XMLString::transcode(nodeValue);

Re: DOM nodeValues: char* to string

2003-03-27 Thread Andreas B. Thun
> Depending on the contents of a node, this could be a lot of string copying. Hmm, this is not high performance. So, it entirely depends on what you are attempting to do... Actually, I just want to assign the node value to a string variable: string nodeValue; // the value should be stored here

Re: DOM nodeValues: char* to string

2003-03-27 Thread Anthony Zawacki
[EMAIL PROTECTED] cc: 03/27/2003 11:28 Subject: Re: DOM nodeValues:

Re: DOM nodeValues: char* to string

2003-03-27 Thread Andreas B. Thun
Thanks a lot for the fast reply! I have now: static string getNodeValue(DOMNode *node) { char*chNodeValue; const XMLCh *nodeValue; string str; if (node) { nodeValue = node->getNodeValue(); chNodeValue = XMLString::transcode(nodeValue); str = chN

Re: DOM nodeValues: char* to string

2003-03-27 Thread Anthony Zawacki
cc: 03/27/2003 10:29 Subject: DOM nodeValues: char* to string

DOM nodeValues: char* to string

2003-03-27 Thread Andreas B. Thun
Hi! I am using the following function to retrieve DOM-node values. But I want to return not (char *), but a STL string value. How can I do it? Sorry for that C++ newbie request. Used to be a C programmer :-) TIA #include static char *getNodeValue(DOMNode *node) { char*chNodeValu