title: parsing of xml in php
body: <pre><code>&lt;aws:TrafficHistoryResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/"&gt;
  &lt;aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11"&gt;
  &lt;aws:OperationRequest&gt;
  &lt;aws:RequestId&gt;0effb937-80d1-431d-80c2-95a883de1040&lt;/aws:RequestId&gt;
  &lt;/aws:OperationRequest&gt;
  &lt;aws:TrafficHistoryResult&gt;
  &lt;aws:Alexa&gt;
  &lt;aws:TrafficHistory&gt;
  &lt;aws:Range&gt;2&lt;/aws:Range&gt;
  &lt;aws:Site&gt;http://xeler8.com/&lt;/aws:Site&gt;
  &lt;aws:Start&gt;2016-03-01&lt;/aws:Start&gt;
  &lt;aws:HistoricalData&gt;
  &lt;aws:Data&gt;
  &lt;aws:Date&gt;2016-03-01&lt;/aws:Date&gt;
  &lt;aws:PageViews&gt;
  &lt;aws:PerMillion&gt;0.06&lt;/aws:PerMillion&gt;
  &lt;aws:PerUser&gt;1.00&lt;/aws:PerUser&gt;
  &lt;/aws:PageViews&gt;
  &lt;aws:Rank&gt;339328&lt;/aws:Rank&gt;
  &lt;aws:Reach&gt;
  &lt;aws:PerMillion&gt;5&lt;/aws:PerMillion&gt;
  &lt;/aws:Reach&gt;
  &lt;/aws:Data&gt;
  &lt;aws:Data&gt;
  &lt;aws:Date&gt;2016-03-02&lt;/aws:Date&gt;
  &lt;aws:PageViews&gt;
  &lt;aws:PerMillion&gt;0.03&lt;/aws:PerMillion&gt;
  &lt;aws:PerUser&gt;1.00&lt;/aws:PerUser&gt;
  &lt;/aws:PageViews&gt;
  &lt;aws:Rank&gt;686679&lt;/aws:Rank&gt;
  &lt;aws:Reach&gt;
  &lt;aws:PerMillion&gt;2&lt;/aws:PerMillion&gt;
  &lt;/aws:Reach&gt;
  &lt;/aws:Data&gt;
  &lt;/aws:HistoricalData&gt;
  &lt;/aws:TrafficHistory&gt;
  &lt;/aws:Alexa&gt;
  &lt;/aws:TrafficHistoryResult&gt;
  &lt;aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/"&gt;
  &lt;aws:StatusCode&gt;Success&lt;/aws:StatusCode&gt;
  &lt;/aws:ResponseStatus&gt;
  &lt;/aws:Response&gt;
  </code></pre>
  
  <p>this is response I want to parse in php 
  want to grap the value of Rank Node </p>
  
  <pre><code>$xml = new SimpleXMLElement($response,null,false,
                              'http://awis.amazonaws.com/doc/2005-07-11');
  echo $xml-&gt;TrafficHistoryResponse-&gt;Response-&gt;TrafficHistoryResult-&gt;Alexa-&gt;TrafficHistory-&gt;HistoricalData-&gt;Data-&gt;Rank;
  </code></pre>
  
  <p>using this but not able to get he data
  getting error as</p>
  
  <blockquote>
    <p>PHP Notice:  Trying to get property of non-object in /home/ras-al-ghul/Downloads/urlinfo.php on line 100</p>
  </blockquote>