if(node instanceof XmlStartElement) {
XmlStartElement startElement = (XmlStartElement) node;
Element element = new Element(startElement.getLocalName());
element.addAttributes(startElement.getAttributes());
currentPath.addLast(element);
if(xmlPath.matches(currentPath)) {
nodeQueue.push(node);
currentPath.removeLast();
return true;
}
} else if(node instanceof XmlEndElement) {