I got a xml data as string variable. it has many sets of <item>...</item> I wonder how I can extract all data of <name>..</name> for all the <item> sets and output them in to textarea using javascript?
Note: getjson grabs the remote xml and puts it as content variable: xml set example:
<item>
<title>rober album</title>
<link></link>
<description></description>
<location></location>
<image_url></image_url>
<name>robert</name>
</item>
code:
<script>
$.getJSON('http://anyorigin.com/get?url=http://asite.com/feed/latest&callback=?', function(data){
var Content = data.contents;
//here i want to parse all name element of remote xml and put it in textarea
});
</script>
</head>
<body>
<td><textarea rows="7" cols="15" name="outputtext" style="width: 99%;"></textarea></td>