Hello Reader's!, If you have given a xml data and you need to parse it into Jquery, Then you can use the parseXML function.
Let's see the example below:-
var xml='<Pages><Page Name="test"><controls><test>parsing into jquery.</test></controls></Page>
<Page Name = "User">
<controls><name>findnerd</name>
</controls></page></Pages>';
xmlDoc = $.parseXML( xml ),
$xml = $( xmlDoc );
$($xml).each(function(){
alert($(this).find("Page[Name]>controls>name").text());
});
Now it'll alert the name 'Findnerd ' which will come from Jquery
0 Comment(s)