We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
How do you add the namespace when creating the builder?
I have the following code that add the namespace, but doesn't have a good output:
const xmlObj = { urlset: { $: { xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9' }, _: urls } }; const builder = new xml2js.Builder(); return builder.buildObject(xmlObj);
It generates this weird thing at the bottom:
With the following code, I don't get the namespace:
const builder = new xml2js.Builder({ rootName: 'urlset', $: { xmlns: 'http://www.sitemaps.org/schemas/sitemap/0.9' } }); return builder.buildObject(urls);
Any way to fix this?
The text was updated successfully, but these errors were encountered:
fixes Leonidas-from-XIV#541
23c218a
Also interested in this. What's the best workaround?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi,
How do you add the namespace when creating the builder?
I have the following code that add the namespace, but doesn't have a good output:
It generates this weird thing at the bottom:
With the following code, I don't get the namespace:
Any way to fix this?
The text was updated successfully, but these errors were encountered: