JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="UTF-8">
<title>Basic TreeGrid - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
function MyController($scope){
var data = '<root><assets ID="1" name="All Assets"><assets ID="104" parentID="1" name="EXAMPLE COMPANY"/><assets ID="109" parentID="104" name="CHICAGO"/></assets></root>';
var xml = $.parseXML(data);
var rows = [];
$(xml).find('assets').each(function(){
rows.push({
id: $(this).attr('ID'),
name: $(this).attr('name'),
_parentId: $(this).attr('parentID')
});
});
$scope.data = {total:rows.length,rows:rows};
}
</script>
</head>
<body>
<div ng-controller="MyController">
<table id="tg" class="easyui-treegrid" title="Folder Browser" style="width:700px;height:250px"
data-options="
data: {{data}},
idField: 'id',
treeField: 'name'
">
<thead>
<tr>
<th data-options="field:'name'" width="220">Name</th>
</tr>
</thead>
</table>
</div>
</body>
</html>