Skip to content

Commit

Permalink
Only set textNodeName, build xml is error (#589)
Browse files Browse the repository at this point in the history
Co-authored-by: leyi <leyi@myun.info>
  • Loading branch information
joneqian and leyi authored Jul 22, 2023
1 parent edb30dd commit a04cd1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xmlbuilder/json2xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function indentate(level) {
}

function isAttribute(name /*, options*/) {
if (name.startsWith(this.options.attributeNamePrefix)) {
if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {
return name.substr(this.attrPrefixLen);
} else {
return false;
Expand Down

0 comments on commit a04cd1e

Please sign in to comment.