You need to sign in to do that
Don't have an account?

XMLNode GetText() does not WORK!!!!
Why doesn't this code work
DOM.Document doc = new DOM.Document(); DOM.XmlNode treeNode = doc.createRootElement('RootNode', null ,null); treeNode.addChildElement('testNode', null, null).addTextNode('hello world'); System.debug( '===========' + treeNode.getText() );
I would expect it to print out
<RootNode> <testNode>hello world</testNode> </RootNode>
But Instead I get nothing just a blank string.
Calling
System.debug('==============='+doc.toXmlString());Works But I do NOT want to do this, I want to get the XMLNode text only!!!!