Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XMLBuilder Options

scriptsure opened this issue · comments

commented

Some updates to the XMLBuilder no longer allow for spaces in the name of the node.

BUT thankfully they did add an option to perform noValidation on the name.

The issue is that xml2js doesnt allow me to pass the options through to XMLBuilder. Would you object to changing the following code?

rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {
    headless: this.options.headless,
    allowSurrogateChars: this.options.allowSurrogateChars
  });

TO THIS:

rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {
    ...this.options
  });