Created
August 21, 2010 22:02
-
-
Save thegreatape/542916 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('sys'); | |
var libxmljs = require('libxmljs'); | |
var xml = "<test>\n <![CDATA[My god, it's full of segfaults!]]>\n</test>"; | |
var doc = libxmljs.parseXmlString(xml); | |
var node = doc.get('//test'); | |
var children = node.childNodes(); | |
for (var i in children) { | |
sys.debug(i); | |
sys.debug(children[i]); | |
sys.debug(children[i].name()); | |
sys.debug('----'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment