ok, so I have an xml file that looks like this:
<?xml version="1.0"?>
<Users>
<User ID="1">
<nickname>Tom</nickname>
<password>a password</password>
<host>anemail@hello.com</host>
<email>anemail</email>
<isloggedin>false</isloggedin>
<permission>10</permission>
</User>
<User ID="2">
<nickname>ohai</nickname>
<password>sercret</password>
<host>my@host</host>
<email>my@email</email>
<isloggedin>false</isloggedin>
<permission>1</permission>
</User>
<Users>
now, firstly, I will have a refund that they have an identification number, so the bad one has a "2". from this I will need to go in and edit the fields in it, and then save the xml. so basically I need to open the file, find the information for User ID = "2" and reinstall xml with VARIOUS values inside user 2 without affecting the rest of the document.
from the subscription database:
<User ID="2">
<nickname>ohai</nickname>
<password>sercret</password>
<host>my@host</host>
<email>my@email</email>
<isloggedin>false</isloggedin>
<permission>1</permission>
</User>
// make changes here and end up with
<User ID="2">
<nickname>ohai</nickname>
<password>somthing that is different than before</password>
<host>the most current host that they were seen as</host>
<email>my@email</email>
<isloggedin>false</isloggedin>
<permission>1</permission>
</User>
and etc.
Summary: I need to open a text file, return information through an identification number, edit the information, re-save the file. affecting nothing but user 2
~ Thank you!