return new NodeListImpl();
DocumentImpl document = (DocumentImpl) getOwnerDocument();
if (document == null)
return new NodeListImpl();
NodeIterator it = document.createNodeIterator(this, NodeFilter.SHOW_ALL, null, false);
if (it == null)
return new NodeListImpl();
NodeListImpl elements = new NodeListImpl();
if (uri != null && uri.length() == 1 && uri.charAt(0) == '*') {
uri = null; // do not care
}
if (tagName.length() == 1 && tagName.charAt(0) == '*') {
tagName = null; // do not care
}
it.nextNode(); // skip the first node since it is the root from createNodeIterator
for (Node node = it.nextNode(); node != null; node = it.nextNode()) {
if (node.getNodeType() != ELEMENT_NODE)
continue;
ElementImpl element = (ElementImpl) node;
if (tagName != null) {
String localName = element.getLocalName();