Open Christilut opened 4 years ago
Took me a while to figure this error out: Error: Invalid character in name which comes from the XmlBuilder.
Error: Invalid character in name
Turns out this came from the fact that I accidentally did something like this:
builder.buildObject({ $: { foo: 'bar' }, ... }
And the $ is assumed to be the attrKey but gives the above error when used on the root node.
$
I thought there was something wrong with the attrKey setting or some other bug.
So maybe a quick check can be added with a better error message so others don't fall into this.
Took me a while to figure this error out:
Error: Invalid character in name
which comes from the XmlBuilder.Turns out this came from the fact that I accidentally did something like this:
And the
$
is assumed to be the attrKey but gives the above error when used on the root node.I thought there was something wrong with the attrKey setting or some other bug.
So maybe a quick check can be added with a better error message so others don't fall into this.