As long as the XML doesn’t contain </script>
anywhere, you can put it inside the script tags with a custom type
attribute (and no CDATA section). Give the script tag an id
attribute so you can fetch the content.
<script id="myxml" type="text/xmldata">
<x>
<y z="foo">
</y>
</x>
</script>
...
<script> alert(document.getElementById('myxml').innerHTML); </script>