Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating XML Values

Status
Not open for further replies.

RootNinja

Programmer
Joined
Dec 9, 2008
Messages
1
Location
GB
Hi all,

First thread so let me know if theres too little info.

I have an XML file:

<?xml version="1.0" encoding="utf-8"?>

<users>

<user id ="0">
<username>SHiDi</username>
<password>c822c1b63853ed273b89687ac505f9fa</password>
<active>1</active>
</user>

<user id= "1">
<id>1</id>
<username>John</username>
<password>0659c7992e268962384eb17fafe88364</password>
<active>0</active>
</user>

</users>

Could someone tell how I would use PHP to update the username where id=1?

Any feedback is welcome, thank you.
 
Check out documentation on DOMDocument Class and DOMXPath Class.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top