Skip to content

Instantly share code, notes, and snippets.

View arikon's full-sized avatar

Sergey Belov arikon

  • Yandex
  • Tivat, Montenegro
View GitHub Profile
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(){