Sounds like you want something like the following, which submits a string of xml to a php script on the server, the php then writes the received string into a local file, but you could do anything you want with it. Finally, the php echos a reply back to the html page that sent the xml string and the reply is displayed on the html page.
Running php 5 on apache 2, both files should work as-is if you dump them in the same directory, you could put them on different servers if you like, just be sure to change POST url in the html page - see comment in html code.
Note, the posttest.html code below only works in IE, but Mozilla Browsers have the ability to do XMLHTTP posts just as easily - the info is widely available on the web, just google: mozilla xmlhttp.
over and out, mawrya
======================
CLIENT SIDE HTML - posttest.html
======================
<html>
<head><title>post it pages</title></head>
<body>
<script>
function postXML()
{
//Create string of XML
var sXML="<test>its alive!!</test>";
//Create new XMLHTTP object
var msobj = new ActiveXObject("Microsoft.XMLHTTP");
msobj.open("POST", "posttest.php",false); //Replace "posttest.php" with "
http://www.someserver.com/somescript.php" as needed.
msobj.setRequestHeader("Content-Type", "text/xml");
msobj.setRequestHeader("Content-Length", sXML.length);
//Send XML string to PHP script file/url specified on line 12.
msobj.send(sXML);
//Read and display reply from PHP script
var ans = msobj.responseText;
document.getElementById('text1').innerHTML=ans;
}
</script>
<div id=text1></div>
<input type=button value="click me" onclick="postXML()">
</body>
</html>
=====================
SERVER SIDE PHP - posttest.php
=====================
<?php
$sXML = $GLOBALS['HTTP_RAW_POST_DATA'];
// Open a text file and erase the contents if any
$fp = fopen("myXMLfile.xml", "w");
// Write the data to the file
fwrite($fp, $sXML);
// Close the file
fclose($fp);
//Send a reply back to the webpage that submitted the post data.
echo "Document Received Successfully.";
?>