Hey everyone,
I'm working on a project at the moment using libxmljs and running into a really weird problem.
Input:
var libxml = require("libxmljs");
var doc = new libxml.Document(function(n) {
n.node('root', function(n) {
n.node('child', {foo: 'bar'}, function(n) {
n.node('grandchild', {baz: 'fizbuzz'}, 'grandchild content');
n.node('sibling', 'with content!');
console.log(doc.toString());
Output:
<?xml version="function (n) {
n.node('root', function(n) {
n.node('child', {foo: 'bar'}, function(n) {
n.node('grandchild', {baz: 'fizbuzz'}, 'grandchild content');
});
n.node('sibling', 'with content!');
});
}" encoding="UTF-8"?>
I'm running on v0.6.18 of node.js and 0.5.4 of libxmljs. I've run into a few problems which all seem to feed back to this issue so i'm not sure if its my setup or if there is a problem with the latest version of node or what? The tests all run fine as well.
Any help on this issue would be greatly appreciated!