Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am magicmonkey on github.
  • I am kevinbowman (https://keybase.io/kevinbowman) on keybase.
  • I have a public key ASCGIQUykkPf1YTe7Q4BKBLVI3yuP0A_MOdyyo756ObqOgo

To claim this, I am signing this object:

@magicmonkey
magicmonkey / XML parser bug
Created April 3, 2011 19:02
Demonstrates onEndDocument being called multiple times
var xml = require('./node-xml');
var hierachy = [];
var fs = require('fs');
var util = require('util');
var parser = new xml.SaxParser(function(cb) {
cb.onStartElementNS(function(elem, attrs, prefix, uri, namespaces) {
if (elem == 'row') {
var attrsLookup = {};
attrs.forEach(function(attr) {