<pre>var test = '<thing><real id="width">300</real><real id="height">200</real></thing>'; parser(test, function (error, result) { if (error) { console.error(error); } else { console.log(JSON.stringify(result,null,' ')); } });</pre>