libzypp 17.31.23
Parse.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_PARSER_XML_PARSE_H
13#define ZYPP_PARSER_XML_PARSE_H
14
15#include <iosfwd>
16
20
22namespace zypp
23{
25 namespace xml
26 {
27
96 template<class TData>
97 inline void rnParse( const InputStream & input_r, TData & data_r )
98 {
99 typedef typename TData::RootNode RootNode;
100 TData pdata;
101
102 xml::Reader reader( input_r );
103 RootNode rootNode( pdata );
104 rootNode.take( reader );
105
106 data_r = pdata;
107 }
108
110 } // namespace xml
113} // namespace zypp
115#endif // ZYPP_PARSER_XML_PARSEDEF_H
Helper to create and pass std::istream.
Definition: inputstream.h:57
xmlTextReader based interface to iterate xml streams.
Definition: Reader.h:96
void rnParse(const InputStream &input_r, TData &data_r)
Parse xml input_r and store data in data_r.
Definition: Parse.h:97
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2