studentoftheliving Posted September 15, 2008 Share Posted September 15, 2008 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 More sharing options...
Ingolme Posted September 15, 2008 Share Posted September 15, 2008 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 More sharing options...
studentoftheliving Posted September 16, 2008 Author Share Posted September 16, 2008 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 More sharing options...
spencerl Posted November 18, 2010 Share Posted November 18, 2010 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 More sharing options...
boen_robot Posted November 18, 2010 Share Posted November 18, 2010 Did you read this part of the tutorial? Link to comment Share on other sites More sharing options...
Fritz_Doll Posted December 8, 2010 Share Posted December 8, 2010 Just what I was hoping to avoid(PHP), but if I have to use it I guess I'll just throw it into an <iframe> and call it good. Thanks for the link boen_robot. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.