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
allowEmpty fails #133
Comments
Please see: https://github.com/oozcitak/xmlbuilder-js/wiki#converting-to-string. You need to set |
I don't understand. Taschana seemed to be asking for NON-self-closing tags. @oozcitak your answer seems to just tell her how to get self-closing tags. I'm pointing this out because I, too, am setting |
Can you submit a test case please? |
I cannot, because I'm an idiot and the problem was a case that wasn't going through xmlbuilder at all. Sorry! |
I've got a complex routine to build xml (even generating some namespace for myself), all is well, except for the allowEmpty part.
Generating the string like this:
xmlObject.end({ pretty: true, newLine: "\n", allowEmpty: true })
produces an output like that:
<sch:comsumptionTier xsi:nil="true"/>
I am not sure if an object is not considered "empty" anymore, when it contains an attribute, but this shouldn't prevent the algorithm from producing a closing tag.
Please help me find and (hot)fix this.
Thanks a lot for the otherwise great plugin and I am looking forward to new features!
Natascha
PS: if you want more code to debug this, just say so.
The text was updated successfully, but these errors were encountered: