Find the first node in a XML string matching the specified path. The path is a dot separated list of tags and can include a index number to select a specific node.
XML string or buffer
Dot separated path to the node
Node or undefined if not found
Returns the first inner node of rootTag:
const xml = `<rootTag> <inner /> <inner /> </rootTag>`;const tag = getNode(xml, 'rootTag.inner|1'); Copy
const xml = `<rootTag> <inner /> <inner /> </rootTag>`;const tag = getNode(xml, 'rootTag.inner|1');
Find the first node in a XML string matching the specified path. The path is a dot separated list of tags and can include a index number to select a specific node.