I've encountered a problem working on a development project and am simply running out of time to find a fix. I've looked for DAYS (literally) and can't seem to find anything that FIXES the problem. ...lots of information, but nothing that actually works.
Using JavaScript, I'm trying to load an XML file, manipulate the data inside it, and send the resulting XML DOM to a PHP page for processing/saving.
First, is this workable?
Second (let's keep it simple), here's my IE code - forget NS:
// Begin JavaScript...
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("GET", "filename.xml", false);
xmlHttp.send();
var xmlDoc=xmlHttp.responseText;
//...use xmlDoc throughout the application...
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", " false);
xmlHttp.setRequestHeader("Content-Type","application/xml");
xmlHttp.setRequestHeader("Charsets", "iso-8859-1");
*xmlHttp.send(xmlDoc);
alert(xmlHttp.responseBody);
Here's the problem: When the http request is sent*, how can PHP accpet the XML DOM? What is the appropriate way to access the XML DOM on the PHP side of things (assuming the XML can get there)? For example, is the XML available through the $HTTP_POST_VARS or $_REQUEST array or something? I'm using print_r() to see what's in these arrays...but I get an empty array. Anyone know of any working examples out there?
Any help would be greatly appreciated!
Using JavaScript, I'm trying to load an XML file, manipulate the data inside it, and send the resulting XML DOM to a PHP page for processing/saving.
First, is this workable?
Second (let's keep it simple), here's my IE code - forget NS:
// Begin JavaScript...
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("GET", "filename.xml", false);
xmlHttp.send();
var xmlDoc=xmlHttp.responseText;
//...use xmlDoc throughout the application...
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttp.open("POST", " false);
xmlHttp.setRequestHeader("Content-Type","application/xml");
xmlHttp.setRequestHeader("Charsets", "iso-8859-1");
*xmlHttp.send(xmlDoc);
alert(xmlHttp.responseBody);
Here's the problem: When the http request is sent*, how can PHP accpet the XML DOM? What is the appropriate way to access the XML DOM on the PHP side of things (assuming the XML can get there)? For example, is the XML available through the $HTTP_POST_VARS or $_REQUEST array or something? I'm using print_r() to see what's in these arrays...but I get an empty array. Anyone know of any working examples out there?
Any help would be greatly appreciated!
