public MappedXMLStreamReader(JSONObject obj, MappedNamespaceConvention con)
throws JSONException, XMLStreamException {
String rootName = (String) obj.keys().next();
this.convention = con;
this.nodes = new FastStack();
Object top = obj.get(rootName);
if (top instanceof JSONObject) {
this.node = new Node(rootName, (JSONObject)top, convention);
} else if (top instanceof JSONArray && !(((JSONArray)top).length() == 1 && ((JSONArray)top).get(0).equals(""))) {
this.node = new Node(rootName, ((JSONArray)top).getJSONObject(0), convention);