I'm using SimpleXML for parsing XMl documents. I need to be able to read/update node attributes.
In this XML document
<root>
  <node>ABC</node>
  <key>123</key>
  <node2>
     <key>456</key>
  </node2>
  <key>789</key>
</root>
How can I read/update all key nodes? the document doesn't have a specific structure, so I need to be able to find them without knowing their position. Let's say I want to multiply by 2 the numbers in the key nodes. How can I do it?
Tks.
 
     
     
     
    