-
-
Notifications
You must be signed in to change notification settings - Fork 357
Closed
Description
- Are you running the latest version?
- Have you included sample input, output, error, and expected output?
- Have you checked if you are using correct configuration?
- Did you try online tool?
- Have you checked the docs for helpful APIs and examples?
Description
During XML building, CDATA with null value is not handled properly. When a value is null, the cdata property is ignored and treated as a normal node.
Code
import { XMLBuilder } from 'fast-xml-parser'
const jObj = {
a: { $cdata: null },
b: { $cdata: undefined },
};
const builder = new XMLBuilder({ cdataPropName: '$cdata' });
console.log(builder.build(jObj));Output
<a><$cdata/></a><b></b>
expected data
<a></a><b></b>
Would you like to work on this issue?
- Yes
- No
Bookmark this repository for further updates. Visit SoloThought to know about recent features.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels