Skip to content
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 from

Conversation

felixge
Copy link

@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.

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
Copy link
Author

felixge commented Jul 25, 2011

Any chance of getting this merged?

@oozcitak
Copy link
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

@oozcitak
Copy link
Owner

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants