I have xml file <?xml version="1.0" encoding="utf-8"?> <chat> <user>HoangThanh:</user> <content>Welcome !</content> </chat> <chat> <user>Guest:</user> <content>Hi !</content> </chat> Code (markup): I want to add node <chat></chat> with its data <user></user> and <content></content>, how can I do ? Please help me !
Open the file with a text editor and just write them If you want someone to really help you - you better tell how this file is generated, post some code or something like this.
In my form, have one textinput and one button, i want that, when click on button, all text in textinput will be add into xml file (node content - and node user - generate somthing ...). Just only that ! Can you help me plz !
Hi Micheal, If you want to edit the xml with javscript, then you should know that, 1. xml editing through javscript is possible on server side. 2. on client side though, you can edit the xml only in memory, and i think you can't chnage anything on the client's computer as browser security prevents it. But i think you are looking for a solution on local system. In that case javascript can be used. Hope this link helps. "http://www.w3schools.com/dom/dom_intro.asp"