I want to make everyone aware of a bug that Adobe is saying is in Chrome. If you use xml.toXMLString() or xml.toString() or String(xml) there is a possibility that your xml is going to be clipped for users that are on 32 bit Chrome on Windows.
If you want more information you can refer to the Chrome bug ticket <https://code.google.com/p/chromium/issues/detail?id=570776> we have created. After looping 5000 times over xml that has 100 nodes with 100 attributes of 130 characters it failed 190 times and every time passed after doing another .toXMLString() Here <https://gist.github.com/anonymous/191a19686e7b4acfcdab> is how we are fixing it (Spoiler: We just retry)