root = doc->getDocumentElement();
child=root->getLastChild();
DOMNode* removedElement = root->removeChild(child);
removedElement->release();
The child is getting newline character as a node if the XML file is like this:
<root>
<child1> </child1>
<child2> text </child2>
</root>
The same code is working fine and removing child if the XML file is of the format
<root> <child1></child1><child2>text</child2> </root>
How can I get rid of it (the newline)?