Skip to content

Instantly share code, notes, and snippets.

@arikon
Created October 4, 2010 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arikon/609736 to your computer and use it in GitHub Desktop.
Save arikon/609736 to your computer and use it in GitHub Desktop.
var libxml = require('libxmljs');
var snippetXml = '<snippet><phone>123</phone><car>Ford Mondeo</car></snippet>',
snippetDoc = libxml.parseXmlString(snippetXml),
xml = '<doc id="123"></doc>',
doc = libxml.parseXmlString(xml);
doc.root().addChild(snippetDoc.root());
setTimeout(function(){
console.log('done');
}, 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment