Updating XML Files

wxdqz

New Member
Hey guys,

I'm making a type of online chat program, and I had a quick question. I want to make a XML file in the following format:


<xml>
<timestamp_start>blah</timestamp_start>
<chat>
<Username1>What he just inputted right here</Username1>
<Username2>What he just inputted right here</Username2>
<Username1>What he just inputted right here</Username1>
##So on and so forth
</chat>
<timestamp_end>blah</timestamp_end>
</xml>


Now I plan on having the chat program create a basic XML file with the following items when the chat session is initiated: Timestamp_start, XML (of course), and chat (of course again). The two usernames will be stored in two seperate PHP variables when the session is initiated as well. I just was wondering how I would be able to get the xml file to update itself and add the new <Username#>text inputted here</Username#> to the file every single time either side pressed the submit button. Thanks in advance!

Michael
 
Back
Top