title: How to handle XmlNode error in CA/L
body: <p>I have used a DotNet function to read XmlNodes from an XML file, however sometimes we get sent an XML file which doesn't contain a DateTime attribute for a certain node..</p>
  
  <p>When I run my CodeUnit, I get an error due to there being no node to read and the file instantly gets discarded in the Error folder -> is there a way of doing either a Try / Catch or checking if the node is not empty / null?</p>
  
  <pre><code>XmlInBound.LocationDateType := xmlNode.SelectSingleNode('DateTime/@DateType').Value();
  </code></pre>
  
  <p>The above errors out when there is no attribute to read. I am using Dynamics-Nav 2013 R2.</p>