0.0.2 • Published 10 years ago

kiss-xml v0.0.2

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

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