title: Check if an XML node exists, using Tinyxml
body: <p>I am using tinyXml for parsing an XML file in C++. Could anyone please tell me how do I check to see if a node (parent/child/next sibling) exists or not. Below are the only nodes present in the xml file I'm working on.</p>
  
  <pre><code>TiXmlElement* Instrmt = TrdCaptRpt-&gt;FirstChildElement();
  TiXmlElement* Undly = Instrmt-&gt;NextSiblingElement();
  TiXmlElement* Amt = Undly-&gt;NextSiblingElement();
  TiXmlElement* RptSide = Amt-&gt;NextSiblingElement();
  TiXmlElement* Pty = RptSide-&gt;FirstChildElement();
  </code></pre>
  
  <p>if any of the nodes above is missing in the sequence then the program aborts with a segmentation fault.</p>
  
  <p>Could anyone please help.</p>
  
  <p>Thanks</p>