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

NamespaceError: The operation is not allowed by Namespaces in XML. [XMLNS] Qualified name includes a prefix but the namespace is null. #51

Closed
japel opened this issue Aug 28, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@japel
Copy link

japel commented Aug 28, 2020

Describe the bug
When trying to specify xmlns: 'http://xml.datev.de/bedi/tps/document/v04.0' in my root element I get the following:
NamespaceError: The operation is not allowed by Namespaces in XML. [XMLNS] Qualified name includes a prefix but the namespace is null.

To Reproduce

let root = create({version: '1.0', encoding: 'utf-8'})
			.ele('archive', {
				version: '4.0',
				'xmlns:xsi': 'http://www.w3.org/2001/XMLSchema-instance',
				'xsi:schemaLocation': 'http://xml.datev.de/bedi/tps/document/v04.0 document_v040.xsd',
				xmlns: 'http://xml.datev.de/bedi/tps/document/v04.0'
			});
const xml = root.end({prettyPrint: true});

Expected behavior
It should be possible to specify xmlns attribute.

Version:

  • node.js: [14.0.0]
  • xmlbuilder2 [2.3.1]

Additional context
None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants