| Method | What it does |
| AndroidXml.parse(input) | An ArrayBuffer or Uint8Array → a document: protobuf XML when the bytes look like it, binary XML otherwise. Throws when the file is neither. |
| AndroidXml.parseBinary(input), AndroidXml.parseProto(input) | One format only. |
| document | { root, strings, stringCount, utf8, flags, resourceMap, errors, proto }. errors lists what could not be read, as sentences. |
| element | { type: "element", name, prefix, namespaceUri, attributes, children, line, comment }, plus namespaceDeclarations: [{ prefix, uri }] on the element that declares them. A child is an element or { type: "text", text }. |
| attribute | { prefix, namespaceUri, name, value: { text, kind }, valueType, valueData, resourceId }; kind is "string", "ref", "num", "bool", "color" or "null". |
| AndroidXml.isBinary(bytes), AndroidXml.isProto(bytes) | Whether the bytes look like binary XML (chunk type 3) or an aapt2 XmlNode. |
| AndroidXml.toXml(root) | The element and its children as indented XML text, without the <?xml?> declaration. |
| AndroidXml.attribute(element, name, prefix) | The attribute with that name (and prefix, when given; null means no namespace), or null. |
| AndroidXml.attributeText(element, name) | The text of android:name, or of name without a namespace, or null. |
| AndroidXml.walk(element, visit) | Calls visit for the element and every element below it. |
| AndroidXml.manifestSummary(root) | What a manifest declares: { package, versionCode, versionName, minSdk, targetSdk, compileSdk, permissions, dangerousPermissions, components: [{ type, name, exported, permission, hasIntentFilter }] }. |
| AndroidXml.isDangerousPermission(name) | True for runtime permissions the user must grant (camera, location, contacts, SMS…). |
| AndroidXml.formatValue(type, data, raw, strings) | A Res_value as text: { text, kind }. strings(index) resolves string values. |
| AndroidXml.ATTRIBUTE_NAMES, AndroidXml.ANDROID_NAMESPACE | Names of common framework attribute ids; the android namespace URI. |