validating conversion of JSON to XML
问题 While the JSON is correctly formatted (the jsonTweet variable): The JSON input is valid according to RFC 4627 (JSON specfication). Close The JSON input is valid in JavaScript. However, the xml output is obviously invalid (as xmlStringTweet isn't xml at all). The key lines, as it were: JSONObject jsonTweet = tweets.getJSONObject(Long.toString(id)); xmlStringTweet = XML.toString(jsonTweet); where the jsonTweet is found by the "snowflake" id, and, then, ostensibly, converted to an xml string.