title: parse XML attribute via PHP XMLReader
body: <p>the followings are XML sample code.</p>
  
  <pre><code>&lt;m:ad xmlns:m="http://www.w3c.org/soap"&gt;
      &lt;title&gt;&lt;![CDATA[TITLE]]&gt;&lt;/title&gt;
      &lt;phone&gt;123456789&lt;/phone&gt;
      &lt;attributeGroup&gt;
         &lt;attribute id="14" name="A1"&gt;40&lt;/attribute&gt;
         &lt;attribute id="15" name="A2"&gt;50&lt;/attribute&gt;
     &lt;/attributeGroup&gt;
  &lt;/m:ad&gt;
  </code></pre>
  
  <p>I only know PHP XMLReader to get value </p>
  
  <pre><code>$reader = new XMLReader();        
  if ($reader-&gt;name == "title" &amp;&amp; $reader-&gt;nodeType ==XMLReader::ELEMENT) {
      echo $reader2-&gt;read(); // will get TITLE   
   }
  </code></pre>
  
  <p>But how to get attribute A1, A2 . I would like to get 40, and 50 both .</p>