PHP SimpleXML, comment définir les attributs?

si vous avez quelque chose comme,

<hello id="1" name="myName1">
 <anotherTag title="Hello">
 </anotherTag>
</hello>
<hello id="2" name="myName2">
 <anotherTag title="Hi">
 </anotherTag>
</hello>

Comment modifier les attributs d', par exemple, bonjour l'id 2, au nom="William" ? Ou le titre hi hello ?

Merci beaucoup pour votre attention,
H'

OriginalL'auteur punkbit | 2010-03-03