const XmlElement = require('xml2js-extra');
const parseString = require('xml2js').parseString;
parseString(someContent, (err, obj) => {
const tag = Object.keys(obj)[0];
const xmlElement = new XmlElement(tag, obj[tag]);
console.log(xmlElement.tag);
console.log(xmlElement.namespace);
console.log(xmlElement.getChildren().map((c) => c.tag));
console.log(xmlElement.getChildren('tuple').map((c) => c.tag));
console.log(xmlElement.getChildren('dm:person').map((c) => c.tag));
console.log(xmlElement.getChildren('person', 'urn:ietf:params:xml:ns:pidf:data-model').map((c) => c.tag));
console.log(xmlElement.getChildren('dm:person')[0].attributes;
console.log(xmlElement.getChildren('dm:person')[0].getAttribute('id'));
console.log(xmlElement.getChildren('dm:person')[0].hasAttribute('does-not-exist'));
console.log(xmlElement.getChildren('tuple')[0].getChildren('status')[0].getChildren('basic')[0].content);