libzypp 17.38.7
zypp::xmlout Namespace Reference

Classes

class  NodeAttr
 (Key, Value) string pair of XML node attributes More...
class  Node
 RAII writing a nodes start/end tag. More...

Functions

template<class Tp>
std::string asXmlNodeAttr (const Tp &val_r)
 relates: NodeAttr NODE ATTRIBUTE representation of types [asString]
std::ostream & node (std::ostream &out_r, const std::string &name_r, const std::initializer_list< Node::Attr > &attrs_r={})
 relates: Node Write a leaf node without PCDATA
std::ostream & node (std::ostream &out_r, const std::string &name_r, Node::Attr attr_r)
ZYPP_API detail::EscapedString escape (const std::string &in_r)
 Escape xml special charaters (& -> &; from IoBind library).
std::string unescape (const std::string &in_r) ZYPP_API
 Unescape xml special charaters (& -> &; from IoBind library).

Function Documentation

◆ asXmlNodeAttr()

template<class Tp>
std::string zypp::xmlout::asXmlNodeAttr ( const Tp & val_r)

relates: NodeAttr NODE ATTRIBUTE representation of types [asString]

Definition at line 37 of file Xml.h.

◆ node() [1/2]

std::ostream & zypp::xmlout::node ( std::ostream & out_r,
const std::string & name_r,
const std::initializer_list< Node::Attr > & attrs_r = {} )
inline

relates: Node Write a leaf node without PCDATA

<node attr="val"/>
std::ostream & node(std::ostream &out_r, const std::string &name_r, const std::initializer_list< Node::Attr > &attrs_r={})
relates: Node Write a leaf node without PCDATA
Definition Xml.h:198

Definition at line 198 of file Xml.h.

◆ node() [2/2]

std::ostream & zypp::xmlout::node ( std::ostream & out_r,
const std::string & name_r,
Node::Attr attr_r )
inline

Definition at line 204 of file Xml.h.

◆ escape()

ZYPP_API detail::EscapedString zypp::xml::escape ( const std::string & in_r)
inline

Escape xml special charaters (& -> &; from IoBind library).

The detail::EscapedString can be dumped to an ostream and implicitly converts into a std::string.

Definition at line 51 of file XmlEscape.h.

◆ unescape()

std::string zypp::xml::unescape ( const std::string & in_r)

Unescape xml special charaters (& -> &; from IoBind library).

Definition at line 113 of file XmlEscape.cc.