Jump to content

xml change node values problem


studentoftheliving
 Share

Recommended Posts

I was trying to use the information from the w3schools website to build a website of my own. I started trying to use the information on this page, http://www.w3schools.com/dom/dom_nodes_set.asp , to change the text nodes in an xml document. It wasn't working so i just pasted the samples into my hosting account on godaddy and they didn't work. So i pasted them into my freewebs site and they didn't work. So i tried them just on my local machine and it still wouldn't work. The output is correct, but the actual xml document doesn't change. Any help would be appreciated.

Link to comment
Share on other sites

Javascript doesn't modify XML documents, it can just modify the XML structure obtained from the file.Javascript can't write in any files, it would be a big security problem. You can use a server-side language to write in XML documents. PHP has its own DOMDocument class to work with XML.

Link to comment
Share on other sites

Javascript doesn't modify XML documents, it can just modify the XML structure obtained from the file.Javascript can't write in any files, it would be a big security problem. You can use a server-side language to write in XML documents. PHP has its own DOMDocument class to work with XML.
ok .. i understand .. this answers my questions completely .. thanks for the help .. i will start learning php immediately ..
Link to comment
Share on other sites

  • 2 years later...
Javascript doesn't modify XML documents, it can just modify the XML structure obtained from the file.Javascript can't write in any files, it would be a big security problem. You can use a server-side language to write in XML documents. PHP has its own DOMDocument class to work with XML.
I've read the PHP tutorials and several other relevant tutorials and I still can't figure out how to write to an xml file using php. Could somone please explain exactly how the PHP, JavaScript, XML, and HTML is put together in order to modify xml files? To be more specific, can the update be nested in a block of AJAX code. If not, then how do I do this the correct way? Thanks.
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...