-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hello,
at first thank you for that great library, I have a question: I am converting a small json object to xml but keys with empty strings values ("Value": "") in json are coming as self closing xml element (<Value />) But I want it to be a normal opening and closing xml element (<Value></Value>). What am I doing wrong ?
Code:
var myjson = { "Test_details": {
"Test_No.": {
"Value": "",
"Remark": "to be filled by me",
"Example": 1234
}}};
console.log(jsontoxml(myjson, xmlHeader=true, escape=true, removeIllegalNameCharacters=true));
Output:
<?xml version="1.0" encoding="utf-8"?>
<Test_details>
<Test_No.>
<Value />
<Remark>to be filled by me</Remark>
<Example>1234</Example>
</Test_No.>
</Test_details>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels