Skip to content

Commit

Permalink
Add terser version
Browse files Browse the repository at this point in the history
  • Loading branch information
oozcitak committed Jul 5, 2012
1 parent e0ab20b commit 7faebd2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -48,6 +48,17 @@ will result in:
</root>
```

You can specify attributes and text at element creation so you can write the above code as:

``` js
doc.begin('root', {'version': '1.0'})
.ele('xmlbuilder', {'for': 'node-js'})
.ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')
.up()
.up()
.ele('test', 'complete');
```

If you need to do some processing:

``` js
Expand Down

0 comments on commit 7faebd2

Please sign in to comment.