Modify an XML document

Okay, I have a program written in Delphi 6 that opens an XML document and can view content.  What I want to do is change the content, but I have no idea where to begin.  I've looked all over and cannot find a simple answer.  I'm hoping I don't have to use constructs, xsl or all that other crap.  It seems like if I'm getting a "node" I should just as simply be able to edit it.  Anyway, here's the XML file:

______________________________________

<?xml version="1.0"?>
<Users>
   <Character>
      <name>Scott</name>
      <password>test</password>
      <gender>male</gender>
   </Character>
   <Character>
      <name>Aeolus</name>
      <password>test</password>
      <gender>male</gender>
   </Character>
   <Character>
      <name>Bob</name>
      <password>pwforbob</password>
      <gender>male</gender>
   </Character>
   <Character>
      <name>Fred</name>
      <password>fredspw</password>
      <gender>Male</gender>
   </Character>
</Users>
___________________________________

and here's the code:
___________________________________

procedure TForm1.FormCreate(Sender: TObject);
begin
   XMLDoc.LoadFromFile('c:\project\server\users.xml');
   XMLDoc.Active := true;

   StartItemNode := XMLDoc.DocumentElement.ChildNodes.FindNode('Character');
   CharNode := StartItemNode;
   repeat
    ListBox1.AddItem(CharNode.ChildNodes['name'].Text,nil);
    CharNode := CharNode.NextSibling;
   until CharNode = nil;

end;

procedure TForm1.Button1Click(Sender: TObject);
begin
   CharNode := StartItemNode;
   repeat
    if CharNode.ChildNodes['name'].Text = TListBox(Listbox1).Items[TListBox(Listbox1).ItemIndex] then
    ShowMessage (CharNode.ChildNodes['password'].Text);
    CharNode := CharNode.NextSibling;
   until CharNode = nil;
end;

_________________________________

As you can see, it gets all the <name>'s and pupulates a listbox.  Then, if you select one of the names and click "show password" it shows you the <password> from that <name>.  What I want to do is add an EditBox and another button and be able to change the <password> for the selected <name>.  I have no idea where to begin.
LVL 1
CerixusAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CerixusAuthor Commented:
Holy crap, it's like a billion times easier than I expected...

All I did was this:

      CharNode.ChildNodes['password'].Text := Edit1.Text;
      XMLDoc.SaveToFile('c:\project\server\users.xml');

I'm diggint XML...  Sorry for the pointless question, but maybe it will help someone else :)
0
CerixusAuthor Commented:
*digging :)

Please close this question.
0
aikimarkCommented:
You need to post a question in the Community Support forum to request this question be closed PAQ with points refund.
0
PashaModCommented:
Closed, 500 points refunded.
PashaMod
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.