xml2json is a Java librairie allowing to transform any XML string to a JSON format. The datatype interpretation may be customized via a property file : thus, a known xpath may be forced to a Date type, respecting a given format, a numeric value, an array, a string, ... ;