GT2/GT2-Android/node_modules/xmldoc/package.json

92 lines
7.3 KiB
JSON
Raw Normal View History

{
"_args": [
[
{
"raw": "xmldoc@^0.4.0",
"scope": null,
"escapedName": "xmldoc",
"name": "xmldoc",
"rawSpec": "^0.4.0",
"spec": ">=0.4.0 <0.5.0",
"type": "range"
},
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native"
]
],
"_from": "xmldoc@>=0.4.0 <0.5.0",
"_id": "xmldoc@0.4.0",
"_inCache": true,
"_location": "/xmldoc",
"_nodeVersion": "4.1.1",
"_npmUser": {
"name": "nfarina",
"email": "nfarina@gmail.com"
},
"_npmVersion": "2.14.4",
"_phantomChildren": {},
"_requested": {
"raw": "xmldoc@^0.4.0",
"scope": null,
"escapedName": "xmldoc",
"name": "xmldoc",
"rawSpec": "^0.4.0",
"spec": ">=0.4.0 <0.5.0",
"type": "range"
},
"_requiredBy": [
"/react-native"
],
"_resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-0.4.0.tgz",
"_shasum": "d257224be8393eaacbf837ef227fd8ec25b36888",
"_shrinkwrap": null,
"_spec": "xmldoc@^0.4.0",
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/react-native",
"author": {
"name": "Nick Farina",
"email": "nfarina@gmail.com",
"url": "http://nfarina.com"
},
"bugs": {
"url": "https://github.com/nfarina/xmldoc/issues"
},
"contributors": [
{
"name": "Nick Farina",
"email": "nfarina@gmail.com"
}
],
"dependencies": {
"sax": "~1.1.1"
},
"description": "A lightweight XML Document class for JavaScript.",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "d257224be8393eaacbf837ef227fd8ec25b36888",
"tarball": "https://registry.npmjs.org/xmldoc/-/xmldoc-0.4.0.tgz"
},
"gitHead": "48c1b3b4414fa612e5eff005346d6787ab441b98",
"homepage": "https://github.com/nfarina/xmldoc#readme",
"license": {
"type": "MIT",
"url": "https://raw.github.com/nfarina/xmldoc-js/master/LICENSE"
},
"main": "./index",
"maintainers": [
{
"name": "nfarina",
"email": "nfarina@gmail.com"
}
],
"name": "xmldoc",
"optionalDependencies": {},
"readme": "\n## Introduction\n\n`xmldoc` lets you parse XML documents with ease. It's a pure-JavaScript, one-file XML document class with a single dependency on the excellent [`sax`][sax] parser.\n\nFor more on why I wrote this class, see the [blog post][blog].\n\n [blog]: http://nfarina.com/post/34302964969/a-lightweight-xml-document-class-for-nodejs-javascript\n\n## Installation\n\n npm install xmldoc\n\nOr just download the repository and include it in your `node_modules` directly. Or just download the [single JS file][blob]!\n\n [blob]: https://github.com/nfarina/xmldoc/blob/master/lib/xmldoc.js\n\n## Usage\n\n```js\nvar xmldoc = require('../lib/xmldoc');\n\nvar document = new xmldoc.XmlDocument(\"<some>xml</some>\");\n\n// do things\n```\n\n## Classes\n\nThe primary exported class is `XmlDocument`, which you'll use to consume your XML text. `XmlDocument` contains a hierarchy of `XmlElement` instances representing the XML structure.\n\nBoth `XmlElement` and `XmlDocument` contain the same members and methods you can call to traverse the document or a subtree.\n\n## Members\n\n* `name` - the node name, like \"tat\" for `<tat>`. XML \"namespaces\" are ignored by the underlying [sax-js](https://github.com/isaacs/sax-js) parser, so you'll simply get \"office:body\" for `<office:body>`.\n* `attr` - an object dict containing attribute properties, like `bookNode.attr.title` for `<book title=\"...\">`.\n* `val` - the string \"value\" of the node, if any, like \"world\" for `<hello>world</hello>`.\n* `children` - an array of `XmlElement` children of the node.\n* `firstChild`, `lastChild` - pretty much what it sounds like; null if no children\n* `line`, `column`, `position`, `startTagPosition` - information about the element's original position in the XML string.\n\nEach member defaults to a sensible \"empty\" value like `{}` for `attr`, `[]` for `children`, and `\"\"` for `val`.\n\n## Methods\n\nAll methods with `child` in the name operate only on direct children; they do not do a deep/recursive search.\n\nIt's important to note that `xmldoc` is designed for when you know exactly what you want from your XML file. For instance, it's great for parsing API responses with known structures, but it's not great at teasing things out of HTML documents from the web.\n\nIf you need to do lots of searching through your XML document, I highly recommend trying a different library like [node-elementtree](https://github.com/racker/node-elementtree).\n\n### eachChild(func)\n\nSimilar to [underscore's][underscore] `each` method, it will call `func(child, index, array)` for each child of the given node.\n\n### childNamed(name)\n\nPass it the name of a child node and it will search for and return the first one found, or `undefined`.\n\n### childrenNamed(name)\n\nLike `childNamed` but returns all matching children in an array, or `[]`.\n\n### childWithAttribute(name,value)\n\nSearches for the first child with the given attribute value. You can omit `value` to just find the first node with the given attribute defined at all.\n\n### descendantWithPath(path)\n\nSearches for a specific \"path\" using dot notation. Example:\n\n```xml\n<book>\n <author>\n <name isProper=\"true\">George R. R. Martin</name>\n ...\n </author>\n ...\n</book>\n```\n\nIf you just want the `<name>` node and you have the `XmlElement` for the `<book>` node, you can say:\n\n```js\nvar nameNode = bookNode.descendantWithPath(\"author.name\"); // return <name> node\n```\n\n### valueWithPath(path)\n\nJust like `descendantWithPath`, but goes deeper and extracts the `val` of the node. Example:\n\n```js\nvar authorName = bookNode.valueWithPath(\"author.name\"); // return \"George R. R. Martin\"\n```\n\nYou can also use the `@` character to request the value of a particular _attribute_ instead:\n\n```js\nvar authorIsProper = bookNode.valueWithPath(\"author.name@isProper\"); // return \"true\"\n```\n\nThis is not [XPath][]! It's just a thing I made up, OK?\n\n### toString([options])\n\nThis is just an override of the standard JavaScript method, it will give you a string
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/nfarina/xmldoc.git"
},
"scripts": {},
"version": "0.4.0"
}