Leonidas-from-XIV / node-xml2js

XML to JavaScript object converter.
MIT License
4.88k stars 604 forks source link

Is there a way to remove the XML declaration for the xml builder? #600

Open hsheikhali opened 3 years ago

hsheikhali commented 3 years ago

Just wondering if there was a way to remove

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

after running the xml2js.Builder().buildObject()

Reason I am asking is because I'm trying to work with SOAP.. and I don't need extra declarations for building my soap request.

wparad commented 3 years ago

Yes, pass in this property to the builder new xml2js.Builder({ headless: true }).buildObject(json);