Skip to content

code4fukui/XML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XML (xml2json, json2xml)

日本語のREADMEはこちらです: README.ja.md

Convert XML to JSON and back.

Features

  • Convert XML to JSON
  • Convert JSON to XML

Requirements

Usage

import { XML } from "https://js.sabae.cc/XML.js";

const json = XML.toJSON("<xml att='abc'><tag>text</tag></xml>");
console.log(json); // { xml: { att: "abc", tag: { "#text": "text" } } }

const xml = XML.stringify({ xml: { att: "abc", tag: { "#text": "text" } } });
console.log(xml);

License

MIT License — see LICENSE.

About

XML for JavaScript ES module (XML.toJSON / XML.stringify)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors