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

One element of the decoded XML tree. More...

#include <apk/axml.hpp>

Public Member Functions

const XmlAttribute * attribute (std::string_view attr_name) const
 First attribute with this local name (namespace and resource id ignored), or nullptr.
 
const XmlAttribute * attribute_by_id (uint32_t resource_id) const
 First attribute with this resource id, or nullptr.
 
const XmlNode * child (std::string_view tag) const
 First child element with this tag, or nullptr.
 
std::vector< const XmlNode * > children_named (std::string_view tag) const
 All child elements with this tag.
 

Public Attributes

std::string name
 Element tag, e.g. "activity".
 
std::vector< XmlAttribute > attributes
 
std::vector< XmlNode > children
 
std::string text
 Concatenated CDATA content, if any.
 

Detailed Description

One element of the decoded XML tree.

Member Function Documentation

◆ attribute()

const XmlAttribute * dex::axml::XmlNode::attribute ( std::string_view  attr_name) const
inline

First attribute with this local name (namespace and resource id ignored), or nullptr.

For a framework attribute such as android:exported, Android goes by the resource id instead; see attribute_by_id().

◆ attribute_by_id()

const XmlAttribute * dex::axml::XmlNode::attribute_by_id ( uint32_t  resource_id) const
inline

First attribute with this resource id, or nullptr.

An id of 0 matches nothing.

◆ child()

const XmlNode * dex::axml::XmlNode::child ( std::string_view  tag) const
inline

First child element with this tag, or nullptr.

◆ children_named()

std::vector< const XmlNode * > dex::axml::XmlNode::children_named ( std::string_view  tag) const
inline

All child elements with this tag.

Member Data Documentation

◆ name

std::string dex::axml::XmlNode::name

Element tag, e.g. "activity".

◆ attributes

std::vector<XmlAttribute> dex::axml::XmlNode::attributes

◆ children

std::vector<XmlNode> dex::axml::XmlNode::children

◆ text

std::string dex::axml::XmlNode::text

Concatenated CDATA content, if any.


The documentation for this struct was generated from the following file: