tweaks to xml->json parsing