Simple issue in iRest.js which causes &, #, or ? anywhere in the XML document to cause an XMLSERVICE error.
Arises because JavaScript's encodeURI() does not encode these characters, resulting in an invalid URI if the XML document contains them - need to use encodeURIComponent() on each query parameter instead.