kiss-xml
Stupid simple XML parser and serializer
Last updated 6 years ago by warry .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kiss-xml 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.0.2                                ...           latest (6 years ago)

2 Versions

  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |