Skip to content

Commit bde65f8

Browse files
committed
Enable to parse attribute in online editor
1 parent 801dc28 commit bde65f8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ <h1 style="color:white;">Fast XML Parser</h1>
7676
<div class="row">
7777
<div class="col-md-8" style=" color: white;">
7878
<input type="checkbox" id="attrNodeName"> Group all the attributes as properties of given name. <br>
79+
<input type="checkbox" id="ignoreTextNodeAttr" checked="true"> Ignore attributes from parsing <br>
7980
<input type="checkbox" id="ignoreNameSpace"> Remove namespace string from tag and attribute names. <br>
8081
<input type="checkbox" id="ignoreRootElement"> Remove root element from parsed JSON. <br>
8182
<input type="checkbox" id="textNodeConversion" checked="true"> Parse the value of text node to float or integer.<br>
@@ -126,11 +127,11 @@ <h1 style="color:white;">Fast XML Parser</h1>
126127

127128
function buildParsingConfig(){
128129
var config = {
129-
attrPrefix : "@_",
130+
attrPrefix : "",
130131
attrNodeName: $("#attrNodeName").prop("checked") ? "@" : false,
131132
textNodeName : "#text",
132-
ignoreNonTextNodeAttr : true,
133-
ignoreTextNodeAttr : true,
133+
ignoreNonTextNodeAttr : $("#ignoreTextNodeAttr").prop("checked"),
134+
ignoreTextNodeAttr : $("#ignoreTextNodeAttr").prop("checked"),
134135
ignoreNameSpace : $("#ignoreNameSpace").prop("checked"),
135136
ignoreRootElement : $("#ignoreRootElement").prop("checked"),
136137
textNodeConversion : $("#textNodeConversion").prop("checked"),

0 commit comments

Comments
 (0)