Skip to content

Commit

Permalink
fix demo page to set attributes options correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
amitguptagwl committed Feb 16, 2018
1 parent 1d2dc9b commit 99088c0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.html
Expand Up @@ -80,7 +80,7 @@ <h1 style="color:white;">Fast XML Parser</h1>
<input type="checkbox" id="ignoreNameSpace"> Remove namespace string from tag and attribute names. <br>
<input type="checkbox" id="parseNodeValue" checked="true"> Parse the value of text node to float or integer.<br>
<input type="checkbox" id="ParseAttributeValue"> Parse the value of an attribute to float or integer.<br>
<input type="checkbox" id="arrayMode"> Put the value(s) of a tag or attribute in an array. <br>
Set TagName to parse CDATA as separate property <input type="text" id="cdataTagName" style=" color: black;" ><br>
<button id="submit" class="btn btn-primary" type="button">Parse to JSON</button>
</div>
<div class="col-md-4">
Expand Down Expand Up @@ -129,11 +129,15 @@ <h1 style="color:white;">Fast XML Parser</h1>
attributeNamePrefix : "",
attrNodeName: $("#attrNodeName").prop("checked") ? "@" : false,
textNodeName : "#text",
ignoreAttribute : $("#ignoreAttribute").prop("checked"),
ignoreAttributes : $("#ignoreAttributes").prop("checked"),
ignoreNameSpace : $("#ignoreNameSpace").prop("checked"),
parseNodeValue : $("#parseNodeValue").prop("checked"),
parseAttributeValue : $("#parseAttributeValue").prop("checked"),
arrayMode : $("#arrayMode").prop("checked")
trimValues: true, //Trim string values of tag and attributes
decodeHTMLchar: false,
cdataTagName: $("#cdataTagName").val() === "" ? false : $("#cdataTagName").val(),
cdataPositionChar: "\\c"
//arrayMode : $("#arrayMode").prop("checked")
};

return config;
Expand Down

0 comments on commit 99088c0

Please sign in to comment.