varXmlParse=require('lerxml')functionfixture(){return'<service>test</service><item id="1">first</item><item id="2">second</item><user role="developer"><name>djf</name></user>'}varxml=XmlParse(fixture())// by tagconsole.log(xml.tagValue('service'))// test// by tag and attributeconsole.log(xml.tagValue('user','role'))// developer// by nested tagsconsole.log(xml.tagValue('user').tagValue('name'))// djf// by array of tags, matiching the first tag foundconsole.log(xml.tagValue(['not','service']))// test// group of tagsvaritens=xml.tagGroup('item')console.log(itens)// ["<item id=\"1\">first</item>", "<item id=\"2\">second</item>"]console.log(xml.tagValue('item','id'))// 1