следующие примеры кода XML.
<m:ad xmlns:m="http://www.w3c.org/soap">
<title><![CDATA[TITLE]]></title>
<phone>123456789</phone>
<attributeGroup>
<attribute id="14" name="A1">40</attribute>
<attribute id="15" name="A2">50</attribute>
</attributeGroup>
</m:ad>
Я знаю только PHP XMLReader для получения значения
$reader = new XMLReader();
if ($reader->name == "title" && $reader->nodeType ==XMLReader::ELEMENT) {
echo $reader2->read(); // will get TITLE
}
Но как получить атрибут А1, А2. Я хотел бы получить 40 и 50 оба.