The Wayback Machine - https://web.archive.org/web/20220824230607/https://github.com/code4fukui/XML
Skip to content

code4fukui/XML

main
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Aug 24, 2022
Aug 24, 2022
Aug 24, 2022
Aug 24, 2022

XML (xml2json, json2xml)

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);

dependency

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published