You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}}};
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>
The text was updated successfully, but these errors were encountered: