Fixed `unchecked` warnings, more robust XML to JSON conversion

Two changes were made in this revision:
- Java unchecked warnings were fixed (this is a minor change)
- XML to JSON conversion was made more robust
    - This convention was followed http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
    - What changed is
        - Attributes are prefixed with an `@` (which cannot be the start of a valid XML tag, so there can't be a name collision)
        - Content is prefixed with a `#` and called "#text" (which cannot be the start of a valid XML tag, so there can't be a name collision)
        - Empty tags `<tag></tag>` or `<tag/>` are given null values instead of empty string values
    - This approach is more robust because it avoids name collisions which result in loss of data (examples below)

All three examples below are valid XML (according to the W3C XML validator). Processing any of the examples below would result in data loss.

Here is one example where name collision in an attribute results in data loss.
```xml
<a tag="text"><tag>different text</tag></a>
```

Here is another example where name collision in the content section results in data loss.
```xml
<a content="text">different text</a>
```

Here is another example where name collision in the content section results in data loss.
```xml
<a><content>text</content>different text</a>
```

All these cases are fixed in this code.