|
libzypp 17.38.7
|
Namespaces | |
| namespace | parse_def_assign |
| parseDefAssign exposed details | |
| namespace | detail |
Classes | |
| class | Node |
| xmlTextReader based interface to Reader's current node. More... | |
| struct | ParseDefImplConsume |
| class | ParseDef |
| Define a xml node structure to parse. More... | |
| struct | ParseDefConsume |
| Base class for ParseDef consumer. More... | |
| class | ParseDefConsumeRedirect |
| ParseDef consumer redirecting all events to another consumer. More... | |
| class | ParseDefConsumeCallback |
| ParseDef consumer that invokes callbacks. More... | |
| struct | ParseDefException |
| Common base class for ParseDef exceptions. More... | |
| struct | ParseDefBuildException |
| Exceptions when building a ParseDef tree. More... | |
| struct | ParseDefValidateException |
| Parse exceptions related to the documents node structure. More... | |
| struct | ParseDefDataException |
| Parse exceptions related to the nodes content. More... | |
| struct | ParseDefTraits |
| struct | Validate |
| xmlTextReader document validation. More... | |
| class | Reader |
| xmlTextReader based interface to iterate xml streams. More... | |
| class | XmlString |
| xmlChar * wrapper. More... | |
Typedefs | |
| using | ReadState = xmlTextReaderMode |
| using | NodeType = xmlReaderTypes |
Functions | |
| std::ostream & | operator<< (std::ostream &str, const ReadState &obj) |
| relates: ReadState Stream output. | |
| std::ostream & | operator<< (std::ostream &str, const NodeType &obj) |
| relates: NodeType Stream output. | |
| std::ostream & | operator<< (std::ostream &str, const Node &obj) |
| relates: Node Stream output. | |
| template<class TData> | |
| void | rnParse (const InputStream &input_r, TData &data_r) |
Parse xml input_r and store data in data_r. | |
| std::ostream & | operator<< (std::ostream &str, const ParseDef::Impl &obj) |
| std::ostream & | operator<< (std::ostream &str, ParseDef::Mode obj) |
| relates: ParseDef ParseDef::Mode stream output. | |
| std::ostream & | operator<< (std::ostream &str, const ParseDef &obj) |
| relates: ParseDef Stream output. | |
| std::ostream & | operator<< (std::ostream &str, const XmlString &obj) ZYPP_API |
| relates: XmlString Stream output. | |
| std::string | unescape (const std::string &in_r) ZYPP_API |
| Unescape xml special charaters (& -> &; from IoBind library). | |
| ZYPP_API detail::EscapedString | escape (const std::string &in_r) |
| Escape xml special charaters (& -> &; from IoBind library). | |
\ref ParseDef consumer assigning \ref Node text and attribues values to variables. | |
relates: parse_def_assign::Consumer relates: parse_def_assign::Builder This function allows convenient contruction of a parse_def_assign::Consumer to be passed as Node conssumer to ParseDef. Simply list each attribute's name together with the variable its value should be assigned to. If the attribute name is omitted, the node's text value gets assigned. Target variables can be of any type tsupported by Assigner. Basically all types constructible from { ... }
// parsedef for '<setup attr="13">value</setup>'
ParseDef( "attr", MANDTAORY,
xml::parseDefAssign( data.value )
( "attr", data.attr )
>> &setupDone );
| |
| parse_def_assign::Builder | parseDefAssign () |
| template<class Tp> | |
| parse_def_assign::Builder | parseDefAssign (Tp &value_r) |
| template<class Tp> | |
| parse_def_assign::Builder | parseDefAssign (const std::string &attr_r, Tp &value_r) |
| using zypp::xml::ReadState = xmlTextReaderMode |
Definition at line 27 of file libxmlfwd.h.
| using zypp::xml::NodeType = xmlReaderTypes |
Definition at line 31 of file libxmlfwd.h.
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| const ReadState & | obj ) |
relates: ReadState Stream output.
Definition at line 29 of file libxmlfwd.cc.
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| const NodeType & | obj ) |
relates: NodeType Stream output.
Definition at line 50 of file libxmlfwd.cc.
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| const Node & | obj ) |
|
inline |
Parse xml input_r and store data in data_r.
TData must be defaultconstructible and assignable.
TData::RootNode must be a xml::ParseDef constructible from TData&.
| ParseDefException | on parse errors. |
To parse a xml file like this:
You need something like this:
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| const ParseDef::Impl & | obj ) |
Definition at line 353 of file ParseDef.cc.
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| ParseDef::Mode | obj ) |
relates: ParseDef ParseDef::Mode stream output.
Definition at line 452 of file ParseDef.cc.
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| const ParseDef & | obj ) |
relates: ParseDef Stream output.
Definition at line 471 of file ParseDef.cc.
|
inline |
Definition at line 356 of file ParseDefConsume.h.
|
inline |
Definition at line 360 of file ParseDefConsume.h.
|
inline |
Definition at line 364 of file ParseDefConsume.h.
| std::ostream & zypp::xml::operator<< | ( | std::ostream & | str, |
| const XmlString & | obj ) |
relates: XmlString Stream output.
Definition at line 46 of file XmlString.cc.
| 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.
|
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.