JSFiddle - React, Tailwind, and code Playground
by Aleksey Pshenichnov
HTML
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script type="text/xml" id="xmlData">
<companies>
<company name="1" imageurl="logo">
<certification> Certified Best Employer </certification>
<employee> 5,0000 </employee>
<industry> Risk Services </industry>
<html_url> http://www.google.com </html_url>
</company>
<company name="2" imageurl="logo">
<certification> Certified Best Employer </certification>
<employee> 5,0000 </employee>
<industry> Risk Services </industry>
<html_url> http://www.google.com </html_url>
</company>
<company name="3" imageurl="logo">
<certification> Certified Best Employer </certification>
<employee> 5,0000 </employee>
<industry> Risk Services </industry>
<html_url> http://www.google.com </html_url>
</company>
</companies>
</script>
<div id="output">
<table id="companies" class="table table-striped"></table>
</div>
JavaScript
var xmlText = $('#xmlData').text();
var $xmlData = $.parseXML(xmlText)
$('company', $xmlData).each(function(index, company) {
$('#companies').append(
$(document.createElement('tr'))
.append(
$(document.createElement('td'))
.text($(this).attr('name'))
)
.append(
$(document.createElement('td'))
.text($('industry', this).text())
)
.append(
$(document.createElement('td'))
.text($('employee', this).text())
)
.append(
$(document.createElement('td'))
.text($('certification', this).text())
)
);
console.log($('industry', company).text())
});