JSON-to-XML Conversion Tool at onlinexmltools.com

This section provides a tutorial example on how to use an online JSON-to-XML conversion tool at onlinexmltools.com. The output XML document is good, only if input JSON document contains well structured data.

With the JSON-to-XML conversion sample provided in the previous tutorial, let's try an online conversion tool and see how it converts the sample JSON document.

1. Go to "json to xml converter" Website at https://onlinexmltools.com/convert-json-to-xml.

2. Copy and paste our JSON document sample, sample.json, to the "json" area on the left.

{
  "dictionary": {
    "word": [
      {
        "update": {
          "date": "2020-01-01"
        },
        "name": {
          "is acronym": true,
          "value": "DTD"
        },
        "definition": "Document Type Definition",
        "origin": null
        
      },
      {
        "update": {
          "date": "1000-01-01"
        },
        "name": {
          "is acronym": false,
          "value": "Dog"
        },
        "definition": "A domesticated carnivorous mammal",
        "origin": "docga"
      }
    ]
  }
}

3. Review the converted XML document in the "xml" area on the right:

<?xml version="1.0" encoding="UTF-8" ?>
<root>
  <dictionary>
    <word>
      <update>
        <date>2020-01-01</date>
      </update>
      <name>
        <is acronym>true</is acronym>
        <value>DTD</value>
      </name>
      <definition>Document Type Definition</definition>
      <origin/>
    </word>
    <word>
      <update>
        <date>1000-01-01</date>
      </update>
      <name>
        <is acronym>false</is acronym>
        <value>Dog</value>
      </name>
      <definition>A domesticated carnivorous mammal</definition>
      <origin>docga</origin>
    </word>
  </dictionary>
</root>

As you can see, this conversion tool uses almost the same conversion rules as I suggested, except that special characters in the JSON property names are not replaced. For example, "is acronym" is used as an XML element name directly, which results an invalid XML document.

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

XML-JSON Document Conversion

 What Is JSON (JavaScript Object Notation)

 Convert XML Document to JSON Document

 XML-to-JSON Conversion Rules

 XML-to-JSON Conversion Tool at onlinexmltools.com

 XML-to-JSON Conversion Library for Java

 XML-to-JSON Conversion Module for Python

 Convert JSON Document to XML Document

 JSON-to-XML Conversion Rules

JSON-to-XML Conversion Tool at onlinexmltools.com

 JSON-to-XML Conversion Library for Java

 JSON-to-XML Conversion Module for Python

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

 DTD (Document Type Definition) Introduction

 Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating XML Documents Against Specified XML Schemas

 XSL (Extensible Stylesheet Language) Introduction

 Java Implementation of XSLT

 XSLT (XSL Transformations) Introduction

 XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 PHP Extensions for XML Manipulation

 Processing XML with Python Scripts

 XML Notepad - XML Editor

 XML Tools Plugin for Notepad++

 XML Plugin Packages for Atom Editor

 XML 1.1 Changes and Parsing Examples

 Archived Tutorials

 References

 Full Version in PDF/EPUB