JQUERY XML PARSE

IvanVeretko

New Member
Lets say i have an xml.. "xml2.xml"\[code\]<aurora><event> abc </event><event> abc </event><event> abc </event><event> <subeve> def </subeve><subeve> def </subeve><subeve> def </subeve></event><event> <subeve> def </subeve><subeve> def </subeve><subeve> def </subeve></event></aurora>\[/code\]And there is a jquery code..\[code\]<script>$(document).ready(function () { $.ajax({ type: "GET", url: "xml2.xml", dataType: "xml", success: xmlParser });});function xmlParser(xml) { $(xml).find("event").each(function () { $(".slides").append('<b>1'); $(this).find("subeve").each(function () { $(".slides").append('<i>2</i>'); }); $(".slides").append('</b>'); });}</script>\[/code\]
The output is : \[code\]<b>1111</b><i>222</i><b>1</b><i>222</i>\[/code\]But i want the output to be.. : \[code\]<b>1111<i>222</i>1<i>222</i></b>\[/code\]How can i do this..??My second ques.. Is my first ques really silly??:-<
 
Back
Top