Error

27 views
Skip to first unread message

Marc Loney

unread,
May 24, 2012, 10:12:09 AM5/24/12
to libx...@googlegroups.com
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!

Marco Rogers

unread,
May 29, 2012, 1:39:31 PM5/29/12
to libx...@googlegroups.com
FYI, this issues has been resolved. https://github.com/polotek/libxmljs/issues/134
Reply all
Reply to author
Forward
0 new messages