libzypp 17.37.10

helix::detail::XmlNode Class Reference

`#include <zypp/misc/HelixHelpers.h>`

## Public Member Functions
| XmlNode (const xmlNodePtr node)
virtual | ~XmlNode ()
std::string_view | name () const
xmlElementType | type () const
xmlNodePtr | node () const
std::optional< XmlNode > | next () const
std::optional< XmlNode > | children () const
bool | equals (const std::string_view &n) const
bool | isElement (void) const
std::map< std::string, std::string > | getAllProps () const
std::string | getContent (void) const
std::string | getProp (const std::string &name, const std::string &deflt="") const
template<typename T>
T | getValue (const std::string &name, const T &deflt) const
template<typename T>
bool | getValue (const std::string &name, T &target) const
template<>
bool | getValue (const std::string &name, std::string &target) const
template<>
std::string | getValue (const std::string &name, const std::string &deflt) const

## Private Attributes
xmlNodePtr | _node

## Detailed Description

Definition at line 37 of file HelixHelpers.h.

## Constructor & Destructor Documentation

## ◆ XmlNode()

helix::detail::XmlNode::XmlNode | ( | const xmlNodePtr | node | ) |
| inline

Definition at line 44 of file HelixHelpers.h.

## ◆ ~XmlNode()

virtual helix::detail::XmlNode::~XmlNode | ( |  | ) |
| inline virtual

Definition at line 45 of file HelixHelpers.h.

## Member Function Documentation

## ◆ name()

std::string_view helix::detail::XmlNode::name | ( |  | ) | const
| inline

Definition at line 49 of file HelixHelpers.h.

## ◆ type()

xmlElementType helix::detail::XmlNode::type | ( |  | ) | const
| inline

Definition at line 50 of file HelixHelpers.h.

## ◆ node()

xmlNodePtr helix::detail::XmlNode::node | ( |  | ) | const
| inline

Definition at line 52 of file HelixHelpers.h.

## ◆ next()

std::optional< XmlNode > helix::detail::XmlNode::next | ( |  | ) | const
| inline

Definition at line 53 of file HelixHelpers.h.

## ◆ children()

std::optional< XmlNode > helix::detail::XmlNode::children | ( |  | ) | const
| inline

Definition at line 54 of file HelixHelpers.h.

## ◆ equals()

bool helix::detail::XmlNode::equals | ( | const std::string_view & | n | ) | const
| inline

Definition at line 58 of file HelixHelpers.h.

## ◆ isElement()

bool helix::detail::XmlNode::isElement | ( | void |  | ) | const
| inline

Definition at line 59 of file HelixHelpers.h.

## ◆ getAllProps()

std::map< std::string, std::string > helix::detail::XmlNode::getAllProps | ( |  | ) | const
| inline

Definition at line 61 of file HelixHelpers.h.

## ◆ getContent()

std::string helix::detail::XmlNode::getContent | ( | void |  | ) | const
| inline

Definition at line 72 of file HelixHelpers.h.

## ◆ getProp()

std::string helix::detail::XmlNode::getProp | ( | const std::string & | name,
|  | const std::string & | deflt = "" ) const
| inline

Definition at line 83 of file HelixHelpers.h.

## ◆ getValue() [1/4]

template<typename T>

T helix::detail::XmlNode::getValue | ( | const std::string & | name,
|  | const T & | deflt ) const

## ◆ getValue() [2/4]

template<typename T>

bool helix::detail::XmlNode::getValue | ( | const std::string & | name,
|  | T & | target ) const

## ◆ getValue() [3/4]

template<>

bool helix::detail::XmlNode::getValue | ( | const std::string & | name,
|  | std::string & | target ) const

Definition at line 105 of file HelixHelpers.h.

## ◆ getValue() [4/4]

template<>

std::string helix::detail::XmlNode::getValue | ( | const std::string & | name,
|  | const std::string & | deflt ) const

Definition at line 131 of file HelixHelpers.h.

## Member Data Documentation

## ◆ _node

xmlNodePtr helix::detail::XmlNode::_node
| private

Definition at line 41 of file HelixHelpers.h.

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

- zypp/misc/HelixHelpers.h