Suppose I have the following XML structure:
<root>
<item>
<item1>some text is <b>here</b></item1>
<item2>more text is here</item2>
</item>
</root>
I can parse xml using something like:
$(responseXML).find('item').each(function(){
var first_text = $(this).find('item1').text();
var second_text = $(this).find('item2').text();
}
But html is not saved when using .text (). html () is not available for xml in jquery.
Any ideas on how to save internal html while parsing xml?
source
share