node-xml-compare
To compare two xml strings and highlight the differences
Last updated 7 years ago by mithunsatheesh .
MIT · Original npm · Tarball · package.json
$ cnpm install node-xml-compare 
SYNC missed versions from official npm registry.

node-xml-compare

xml compare is node.js package to compare two xml strings, and generate their differences as a html encoded string sothat it could be directly duped into a code block in an html page.

Description

xml compare is built on top of sax-js. sax-js.

Install

It can be installed via.

npm install node-xml-compare

Usage

To use this just pass the xml strings you want to compare into the xmlcompare variable.

var xmlcompare = require('node-xml-compare');

xml1 = "<sample><a>1</a><a>2</a><a>4</a><b>4</b></sample>";
xml2 = "<sample><a>2</a><a>1</a><a>3</a><c>3</c></sample>";

xmlcompare(xml1, xml2, function(result) {

	//render result[-] to html page to show the xml1 nodes that are not in xml2
	//render result[+] to html page to show the xml2 nodes that are not in xml1

});


Current Tags

  • 0.1.0                                ...           latest (7 years ago)

1 Versions

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

Copyright 2014 - 2016 © taobao.org |