title: Checking for null XML data with JavaScript
body: <p>I get data from XML. I need to check data and if data is null I must hide this.</p>
  
  <p>How can I check?</p>
  
  <pre><code>  &lt;script&gt;
     downloadUrl("gxml.php", function(data) {
         var xml = data.responseXML;
         var markers = xml.documentElement.getElementsByTagName("marker");
         for (var i = 0; i &lt; markers.length; i++) {
           var oid = markers[i].getAttribute("objectid");
           var status = markers[i].getAttribute("status");
           var title = markers[i].getAttribute("title");
           var volume = markers[i].getAttribute("volume");
           var kwh = markers[i].getAttribute("kwh");
           var puser = markers[i].getAttribute("puser");
           var ucomp = markers[i].getAttribute("ucomplate");
           var udate = markers[i].getAttribute("udate");
           var suser = markers[i].getAttribute("suser");
           var scomp = markers[i].getAttribute("scomplate");
           var sdate = markers[i].getAttribute("sdate");
              var type = markers[i].getAttribute("type");
           var point = new google.maps.LatLng(
               parseFloat(markers[i].getAttribute("lat")),
               parseFloat(markers[i].getAttribute("lng")));
           var html = "ObjectID:"  + oid + "  &lt;br/&gt; Title:"  + title +"  &lt;br/&gt;Status:" + status + "  &lt;br/&gt;Volume:" + volume + "  &lt;br/&gt; KWh:" + kwh + "  &lt;br/&gt;User:" + puser + "  &lt;br/&gt; User Date:" + udate + "  &lt;br/&gt; User Complate :" + ucomp + "  &lt;br/&gt;Super user:" + suser + "  &lt;br/&gt; S .User Date:" + sdate + "  &lt;br/&gt; S. User Complate :" + scomp + "&lt;br/&gt; &lt;a href=\"edit.php\"&gt;Add/Edit&lt;/a&gt;";
  
  &lt;/script&gt;
  
  // this data i get from xml. i`m need to chek this null or not null
  </code></pre>