dex++ 0.3.1
C++ and C API reference
Loading...
Searching...
No Matches
dex::axml Namespace Reference

Parser for Android binary XML (AXML), the format of AndroidManifest.xml inside an APK. More...

Classes

struct  TypedValue
 A typed attribute value (Res_value). More...
 
struct  XmlAttribute
 One attribute of an element. More...
 
struct  XmlDocument
 
struct  XmlNode
 One element of the decoded XML tree. More...
 

Functions

std::expected< XmlDocument, Error > parse (std::span< const uint8_t > buf)
 Decode a binary-XML buffer into a tree.
 

Detailed Description

Parser for Android binary XML (AXML), the format of AndroidManifest.xml inside an APK.

This is a generic XML-tree decoder; the typed manifest view lives in apk/manifest.hpp.

Function Documentation

◆ parse()

std::expected< XmlDocument, Error > dex::axml::parse ( std::span< const uint8_t >  buf)

Decode a binary-XML buffer into a tree.

The whole tree is owned strings — no views into buf survive the call. Fails with ErrorCode::InvalidXml when buf is not a binary XML document or is too damaged to read.