Thomas Frank has one here that I am using. I had to modify it as it was not retaining values inside of xml tags that contained attributes (eg <myTag myAttr="myAttrValue">myTagValue</myTag> was not retaining "myTagValue" in the JSON. I will post my updates to the code momentarily, just need to clean up some "proprietary" pieces of it.
Updated JS: