We help IT Professionals succeed at work.

MSXML::IXMLDOMNodePtr, GetnodeValue doesn't work on empty nodes?

caber
caber asked
on
Comment
Watch Question

You will get NULL If you try to perform get_nodeValue() on node of one of these types: NODE_DOCUMENT, NODE_DOCUMENT_TYPE, NODE_DOCUMENT_FRAGMENT, NODE_ELEMENT, NODE_ENTITY, NODE_ENTITY_REFERENCE, NODE_NOTATION

You can only use this function on node of types: NODE_ATTRIBUTE, NODE_CDATA_SECTION, NODE_COMMENT, NODE_PROCESSING_INSTRUCTION, NODE_TEXT

--EC--

Author

Commented:
I have an example:

_vatiant_t varTmp;
MSXML::IXMLDOMNodePtr text = node->firstChild;

// The nodeValue is :<firstname>Somename</firstname>
varTmp = text->GetnodeValue() // works fine

// The nodeValue is :<firstname> </firstname>
varTmp = text->GetnodeValue() // error occurs



Commented:
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and PAQ at zero points since nobody had an answer for you.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
Per recommendation, points refunded and question closed
Netminder
CS Moderator