This is a follow up question to this answer:
How do I parse XML from PHP that was sent to the server as text/xml?
JavaScript/jQuery:
var xmlDoc =
Your PHP script receives <items><ITEM>My item!</ITEM></items> as input. Try
<?php
$xml_text = file_get_contents("php://input");
file_put_contents('test.log.txt', $xml_text);
if you think this isn't so.
xmlDoc is an xml document, but the result of jQuery( "<item>My item!</item>" ) isn't.
Along the way jQuery uses .nodeName which behaves like .tagName for elements.
https://developer.mozilla.org/en/DOM/element.tagName says:
In XML (and XML-based languages such as XHTML), tagName preserves case. In HTML, tagName returns the element name in the canonical uppercase form. The value of tagName is the same as that of nodeName.