kiss-xml

0.0.2 • Public • Published

Kiss XML

\see tests.

parse XML

var kiss = require("kiss-xml");
kiss.parse(xmlStr);

serialize JSON

var kiss = require("kiss-xml");
kiss.parse(jsonObj);

Formatting

This what you get from parse and what you have to give to serialize.

XML Node

{
  "name": "nodeName",
  "attrs": {
    "foo": "bar"
  },
  "children": []
}

With text value:

{
  "name": "nodeName",
  "children": ["lorem ipsum"]
}

Comment

{
  "comment": "lorem ipsum"
}

CData

{
  cdata : "foo"
}

Test

mocha test/kiss-xml-test.js

Readme

Keywords

none

Package Sidebar

Install

npm i kiss-xml

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • warry