Convert a well-formed (but not necessarily valid) XML string into a JSONArray using the JsonML transform. Each XML tag is represented as a JSONArray in which the first element is the tag name. If the tag has attributes, then the second element will be JSONObject containing the name/value pairs. If t
(String string)
| 232 | * @return A JSONArray containing the structured data from the XML string. |
| 233 | */ |
| 234 | public static JSONArray toJSONArray(String string) throws JSONException { |
| 235 | return toJSONArray(new XMLTokener(string)); |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Convert a well-formed (but not necessarily valid) XML string into a |