iam very new to xml parsing in jquery. i want to accomplish the below task which iam not able to. any help would be greatly appreciated
I have the below xml
<svg xmlns="http://www.w3.org/2000/svg" class="no_class"><ellipse class="no_class" id="shape:45822758-f1cf-9985-7294-67dc74ef3a51" style="position: absolute; z-index: 5000;" fill="red" stroke="#000000" stroke-width="1px" cx="419px" cy="98px" rx="18px" ry="25px" val_fillcolor="red" val_strokecolor="#000000" itemtype="ellipse" PageNo="1" UserId="2" SD="0x7fffffff" /><ellipse class="no_class" id="shape:3d138742-572a-df2c-44f6-6b6542a5501b" style="position: absolute; z-index: 5001;" fill="red" stroke="#000000" stroke-width="1px" cx="264px" cy="111px" rx="18px" ry="25px" val_fillcolor="red" val_strokecolor="#000000" itemtype="ellipse" PageNo="1" UserId="10" SD="0x7fffffff" /></svg>
The below code i use to loop over each node i.e., ellipse. In the loop i want to get the current node xml contents i.e., the entire <ellipse tag
$(xml).find('ellipse').each(function(){
var text=$(this).xml(); //this doe not work
//alert($(this));
//var text=(new XMLSerializer()).serializeToString($(this));
alert(text);
});
iam stuck on this for the past 2 days..Help is needed