{
  "name": "domhandler",
  "version": "2.0.3",
  "description": "handler for htmlparser2 that turns pages into a dom",
  "main": "index.js",
  "directories": {
    "test": "tests"
  },
  "scripts": {
    "test": "node runtests.js"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/FB55/domhandler.git"
  },
  "keywords": [
    "dom",
    "htmlparser2"
  ],
  "dependencies": {
    "domelementtype": "1"
  },
  "devDependencies": {
    "htmlparser2": "2.3"
  },
  "author": {
    "name": "Felix Boehm",
    "email": "me@feedic.com"
  },
  "readme": "#DOMHandler [![Build Status](https://secure.travis-ci.org/fb55/DomHandler.png)](http://travis-ci.org/fb55/DomHandler)\n\nThe DOM handler (formally known as DefaultHandler) creates a tree containing all nodes of a page. The tree may be manipulated using the DOMUtils library.\n\n##Usage\n```javascript\nvar handler = new DomHandler([ <func> callback(err, dom), ] [ <obj> options ]);\n// var parser = new Parser(handler[, options]);\n```\n\n##Example\n```javascript\nvar htmlparser = require(\"htmlparser2\");\nvar rawHtml = \"Xyz <script language= javascript>var foo = '<<bar>>';< /  script><!--<!-- Waah! -- -->\";\nvar handler = new htmlparser.DomHandler(function (error, dom) {\n    if (error)\n    \t[...do something for errors...]\n    else\n    \t[...parsing done, do something...]\n        console.log(dom);\n});\nvar parser = new htmlparser.Parser(handler);\nparser.write(rawHtml);\nparser.done();\n```\n\nOutput:\n\n```javascript\n[{\n    data: 'Xyz ',\n    type: 'text'\n}, {\n    type: 'script',\n    name: 'script',\n    attribs: {\n    \tlanguage: 'javascript'\n    },\n    children: [{\n    \tdata: 'var foo = \\'<bar>\\';<',\n    \ttype: 'text'\n    }]\n}, {\n    data: '<!-- Waah! -- ',\n    type: 'comment'\n}]\n```\n\n##Option: ignoreWhitespace\nIndicates whether the DOM should exclude text nodes that consists solely of whitespace. The default value is \"false\". \n\nThe following HTML will be used:\n\n```html\n<font>\n\t<br>this is the text\n<font>\n```\n\n###Example: true\n\n```javascript\n[{\n    type: 'tag',\n    name: 'font',\n    children: [{\n    \ttype: 'tag',\n    \tname: 'br'\n    }, {\n    \tdata: 'this is the text\\n',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'font'\n    }]\n}]\n```\n\n###Example: false\n\n```javascript\n[{\n\ttype: 'tag',\n    name: 'font',\n    children: [{\n    \tdata: '\\n\\t',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'br'\n    }, {\n    \tdata: 'this is the text\\n',\n    \ttype: 'text'\n    }, {\n    \ttype: 'tag',\n    \tname: 'font'\n    }]\n}]\n```",
  "readmeFilename": "readme.md",
  "bugs": {
    "url": "https://github.com/FB55/domhandler/issues"
  },
  "_id": "domhandler@2.0.3",
  "dist": {
    "shasum": "fa9a8fcd33dd542b53840e8daae02a72a428eaee"
  },
  "_from": "domhandler@2.0",
  "_resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.0.3.tgz"
}
