tools

XML to JSON

Parse XML into a JSON object keyed by the root element. Attributes become keys with a prefix ("@id"), text beside attributes or children lands under "#text", repeated elements become arrays, and namespace prefixes can be dropped. Malformed XML is reported with the line number; DTD-declared entities are not expanded.

post/api/v1/tools/xml-to-json

Request

  • Base URL: https://toolforte.com
  • URL: https://toolforte.com/api/v1/tools/xml-to-json
  • Auth: HTTP bearer

Request body

xmlstring
attributePrefixstring
dropNamespacesboolean
indentinteger

Response

Successful result

okboolean

Changes

No recorded changes to this operation across all 1 revision of this API.