New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple builder instances #11

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@felixge

felixge commented Jul 20, 2011

Right now the index.coffee exports only a single XMLBuilder instance.
This is problematic when building multiple XML's within a single node
process as it's essentially a singleton where none should be used.

This patch fixes it, but breaks API slightly.

Allow multiple builder instances
Right now the index.coffee exports only a single XMLBuilder instance.
This is problematic when building multiple XML's within a single node
process as it's essentially a singleton where none should be used.

This patch fixes it, but breaks API slightly.
@felixge

This comment has been minimized.

Show comment
Hide comment
@felixge

felixge Jul 25, 2011

Any chance of getting this merged?

felixge commented Jul 25, 2011

Any chance of getting this merged?

@oozcitak

This comment has been minimized.

Show comment
Hide comment
@oozcitak

oozcitak Jul 27, 2011

Owner

Sorry for the delay. I understand the need for multiple builder instances. But I find the builder = require('xmlbuilder')() syntax a little confusing. Instead, I am thinking of adding a named export to return a new instance:

var xmlbuilder = require('xmlbuilder');
var xmldoc = xmlbuilder.create(); // Creates a new instance
Owner

oozcitak commented Jul 27, 2011

Sorry for the delay. I understand the need for multiple builder instances. But I find the builder = require('xmlbuilder')() syntax a little confusing. Instead, I am thinking of adding a named export to return a new instance:

var xmlbuilder = require('xmlbuilder');
var xmldoc = xmlbuilder.create(); // Creates a new instance
@oozcitak

This comment has been minimized.

Show comment
Hide comment
@oozcitak

oozcitak Jul 27, 2011

Owner

Closed by 6828c05

Owner

oozcitak commented Jul 27, 2011

Closed by 6828c05

@oozcitak oozcitak closed this Jul 27, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment