Lines Matching refs:tree
63 Result<void> findManifestElement(ResXMLTree& tree) { in findManifestElement() argument
65 ResXMLParser::event_code_t event = tree.next(); in findManifestElement()
73 return Error() << "Failed to parse XML: " << statusToString(tree.getError()); in findManifestElement()
81 if (tree.getElementNamespaceID() >= 0) { in findManifestElement()
85 const char16_t* nameChars = tree.getElementName(&nameLength); in findManifestElement()
102 Result<std::string> getStringOnlyAttribute(const ResXMLTree& tree, size_t index) { in getStringOnlyAttribute() argument
104 const char16_t* value = tree.getAttributeStringValue(index, &len); in getStringOnlyAttribute()
112 Result<uint32_t> getU32Attribute(const ResXMLTree& tree, size_t index) { in getU32Attribute() argument
113 auto type = tree.getAttributeDataType(index); in getU32Attribute()
119 return tree.getAttributeData(index); in getU32Attribute()
122 auto str = OR_RETURN(getStringOnlyAttribute(tree, index)); in getU32Attribute()
144 ResXMLTree tree; in parseManifest() local
145 auto status = tree.setTo(manifest, size); in parseManifest()
150 OR_RETURN(findManifestElement(tree)); in parseManifest()
154 size_t count = tree.getAttributeCount(); in parseManifest()
159 chars = tree.getAttributeNamespace(i, &len); in parseManifest()
162 chars = tree.getAttributeName(i, &len); in parseManifest()
167 auto result = getStringOnlyAttribute(tree, i); in parseManifest()
173 auto result = getU32Attribute(tree, i); in parseManifest()
177 auto result = getU32Attribute(tree, i); in parseManifest()