title: how can i remove an error on php when i process an xml childnodes->length
body: <p>I am trying to read some XML but I have some errors when I try to get the length of the child.</p>
  
  <p><a href="http://pastebin.com/3Bjg2RjT" rel="nofollow">Here</a> is an example of the XML and <a href="http://pastebin.com/iE0MiFkL" rel="nofollow">here</a> is the code to process the xml.</p>
  
  <p>The problem occurs sometimes when I access the length, for example in line 92.</p>
  
  <p>The error is:</p>
  
  <pre><code>A PHP Error was encountered
  Severity: Notice
  Message: Trying to get property of non-object
  Filename: backend/mantenimiento.php
  Line Number: 159
  </code></pre>