-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.json
76 lines (76 loc) · 3.48 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
"name": "xtraverse",
"version": "0.1.0",
"description": "Wrapper for simplifying XML traversal.",
"keywords": [
"xml",
"dom",
"traversal",
"builder",
"jquery"
],
"repository": {
"type": "git",
"url": "git://github.com/jaredhanson/node-xtraverse.git"
},
"bugs": {
"url": "http://github.com/jaredhanson/node-xtraverse/issues"
},
"author": {
"name": "Jared Hanson",
"email": "jaredhanson@gmail.com",
"url": "http://www.jaredhanson.net/"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"main": "./lib",
"dependencies": {
"xmldom": "0.1.x"
},
"devDependencies": {
"mocha": "1.x.x",
"chai": "1.x.x"
},
"engines": {
"node": ">= 0.4.0"
},
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js"
},
"testling": {
"browsers": [
"chrome/latest"
],
"harness": "mocha",
"files": [
"test/bootstrap/testling.js",
"test/*.test.js"
]
},
"readme": "# xtraverse\n\nSimplified traversal and building of an XML DOM.\n\nThis module provides a [jQuery](http://jquery.com/)-like wrapper, but geared for\ntraversing and manipulating an XML DOM, as opposeed to an HTML DOM. The API\naims to be compatible with [Strophe.js](https://github.com/strophe/strophejs)'\n`Builder` and [Less-Than XML](https://github.com/astro/ltx). The underlying DOM\nis W3C standard, provided by [XMLDOM](https://github.com/jindw/xmldom).\n\n## Install\n\n $ npm install xtraverse\n\n## Usage\n\n#### Parse XML\n\n```javascript\nvar xml = fs.readFileSync('feed.xml', 'utf8');\nvar feed = XT(xml);\n```\n\n#### Traverse XML\n\n```javascript\nconsole.log(feed.children('title').text());\nfor (var link = feed.children().first('link'); link.length > 0; link = link.next('link')) {\n console.log(link.attr('href'));\n}\nfor (var entry = feed.children().first('entry'); entry.length > 0; entry = entry.next('entry')) {\n console.log('Entry: ' + entry.children('title').text());\n}\n```\n\n#### Build XML\n\n```javascript\nvar feed = XT('<feed xmlns=\"http://www.w3.org/2005/Atom\"/>')\n .c('title').t('Example Feed').up()\n .c('link', { href: 'http://example.org/' })\n .c('entry').c('title').t('Atom-Powered Robots Run Amok').up().up()\n .c('entry').c('title').t('Today I Ate Pancakes');\n```\n\n## Tests\n\n $ npm install\n $ npm test\n\n## Status\n\n[![Build Status](https://secure.travis-ci.org/jaredhanson/node-xtraverse.png)](http://travis-ci.org/jaredhanson/node-xtraverse)\n[![David DM](https://david-dm.org/jaredhanson/node-xtraverse.png)](http://david-dm.org/jaredhanson/node-xtraverse)\n\n## Credits\n\n - [Jared Hanson](http://github.com/jaredhanson)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>\n",
"readmeFilename": "README.md",
"_id": "xtraverse@0.1.0",
"dist": {
"shasum": "b741bad018ef78d8a9d2e83ade007b3f7959c732",
"tarball": "http://registry.npmjs.org/xtraverse/-/xtraverse-0.1.0.tgz"
},
"_from": "xtraverse@0.1.x",
"_npmVersion": "1.2.25",
"_npmUser": {
"name": "jaredhanson",
"email": "jaredhanson@gmail.com"
},
"maintainers": [
{
"name": "jaredhanson",
"email": "jaredhanson@gmail.com"
}
],
"directories": {},
"_shasum": "b741bad018ef78d8a9d2e83ade007b3f7959c732",
"_resolved": "https://registry.npmjs.org/xtraverse/-/xtraverse-0.1.0.tgz"
}