According to the given xpath selector, match and return the satisfied elements inside UI page \param outElements A vector storing matched elements \param xpathSelector xpath selector describing the value of property that a matched element should have \param elementXML Node from the XML tree of UI page
| 417 | /// \param xpathSelector xpath selector describing the value of property that a matched element should have |
| 418 | /// \param elementXML Node from the XML tree of UI page |
| 419 | void Preference::findMatchedElements(std::vector<ElementPtr> &outElements, |
| 420 | const XpathPtr &xpathSelector, |
| 421 | const ElementPtr &elementXML) { |
| 422 | if (!elementXML) { |
| 423 | BLOGE("%s", "xml node is null"); |
| 424 | return; |
| 425 | } |
| 426 | if (elementXML->matchXpathSelector(xpathSelector)) |
| 427 | outElements.push_back(elementXML); |
| 428 | |
| 429 | for (const auto &child: elementXML->getChildren()) { |
| 430 | findMatchedElements(outElements, xpathSelector, child); |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | void Preference::deMixResMapping(const ElementPtr &rootXML) { |
| 435 | if (!rootXML || this->_resMixedMapping.empty()) |
no test coverage detected