Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.84k stars 596 forks source link

XMLBuilder Options #657

Open scriptsure opened 1 year ago

scriptsure commented 1 year ago

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
  });