Hello I have the following Problem:
xerces shut down my programm when it wants to output an non existing node,
here an exmple.
I want to read out the text of the elements.
<xml>
<element_a >test</element_a>
<element_b />test</element_b>
</xml>
The source code:
DOMNodeList* nodes =
root->getElementsByTagName(XMLString:transcode("elementa"));
cout << nodes->item(0)->getTextContent() << endl;
This code makes no Problem while i ask for elemts which are in the xmlfile
below, but if i ask for element_c which is not in the xml file the code
before exit my programm by reaching the code line
nodes->item(0)->getTextContent().
I have also tried to get out if the pointer is empty or there is no nodes
with nodes->getlength() , but also here xerces is closing down my programm
without an error message.
If someone had an idea where the problem ist or how i can solve the
problem please write it to me
Thanks David
P.S I hope you understand my problem