[Pkg-javascript-commits] [node-expat] 208/371: added something to parse in example

Jonas Smedegaard dr at jones.dk
Sun Feb 28 10:00:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-expat.

commit b79702fc42ad26be7829afc0cc5bda5c5b53f169
Author: AJ ONeal <coolaj86 at gmail.com>
Date:   Wed May 29 00:41:10 2013 -0400

    added something to parse in example
---
 README.markdown | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.markdown b/README.markdown
index ef87caa..118ec11 100644
--- a/README.markdown
+++ b/README.markdown
@@ -28,9 +28,9 @@ Important events emitted by a parser:
 
 ```javascript
 (function () {
-"use strict";
+  "use strict";
 
-  var expat = require('./lib/node-expat')
+  var expat = require('node-expat')
     , parser
     ;
 
@@ -44,6 +44,10 @@ Important events emitted by a parser:
   parser.on('text', function (text) {
     console.log(text);
   });
+  parser.on('error', function (err) {
+    console.error(err); 
+  });
+  parser.write("<html><head><title>Hello World</title></head><body><p>Foobar</p></body></html>");
 }());
 
 ```

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-expat.git



More information about the Pkg-javascript-commits mailing list