| 752 | } |
| 753 | |
| 754 | sp<XMLNode> XMLNode::searchElement(const String16& tagNamespace, const String16& tagName) |
| 755 | { |
| 756 | if (getType() == XMLNode::TYPE_ELEMENT |
| 757 | && mNamespaceUri == tagNamespace |
| 758 | && mElementName == tagName) { |
| 759 | return this; |
| 760 | } |
| 761 | |
| 762 | for (size_t i=0; i<mChildren.size(); i++) { |
| 763 | sp<XMLNode> found = mChildren.itemAt(i)->searchElement(tagNamespace, tagName); |
| 764 | if (found != NULL) { |
| 765 | return found; |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | return NULL; |
| 770 | } |
| 771 | |
| 772 | sp<XMLNode> XMLNode::getChildElement(const String16& tagNamespace, const String16& tagName) |
| 773 | { |
no test coverage detected