polotek/libxmljs — Issue #107: No attributes in new created document. Needs fix
Author: m1ci
Created: 2012-02-10 17:31:25+00:00
State: open

Hi!

I just tried to create some simple xml doc but in the output I get xml document without attributes.

The code:
var doc = new libxml.Document();
doc.node('root')
.node('child', {foo: 'bar'})
.node('grandchild', {baz: 'fizbuzz'}, 'grandchild content')
.parent()
.parent()
.node('sibling', 'with content!');

The output is:

with content!

Where went the attributes?

Cheers,
Milan