Hello people, im back for more questions.
Recently I posted a question regarding structures(and you were all very helpful) but Now I have another problem:
I have a file with the following:
<usr>
<id>1</id>
<name>John Greer</name>
<pass>abcdef</pass>
<status>Active</status>
</usr>
How in earth can I modify this file. I want to acces information on a file....
for example the user wants to modify his password. What kind of restriction can I make so when the terminal finds the '<pass>' and starts reading after the '>' and stops in '</pass>' and modify exactly that part?? so for example
Terminal:Hello John.
What is your current password?
Usr: abcdef
Terminal: That is correct, do you wish to change it?
Usr: yes
Terminal: Ok, give me your new pass.
User: xyz
----and then the file goes from what I first showed you:
<usr>
<id>1</id>
<name>John Greer</name>
<pass>abcdef</pass>
<status>Active</status>
</usr>
to this:
<usr>
<id>1</id>
<name>John Greer</name>
<pass>xyz</pass>
<status>Active</status>
</usr>
Very much appreciated guys