JQuery to Parse XML file in Electron -


i have following xml file:

test.xml

<page> <checkbox>     <label>works</label> </checkbox> </page> 

i have electron set , have jquery implemented correctly. when say:

var xml = "<page><checkbox><label>works</label></checkbox></page>"; var doc = $.parsexml(xml); var $xml = $(doc); var $checkbox = $xml.find("checkbox"); $checkbox.each(function(){     var label = $(this).find('label').text();     $(".ntbk-container" ).append('<input type=checkbox class=checkbox>'+label+"</input>"); }); 

the page renders correctly , checkbox. want read file, did i've seen many people do:

var file $.get(file_path,function(data){     file = data; },'text') var xml = file; ...(the rest of prevoious code) 

then no result. how able this?


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -