libzypp  13.10.6
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 
17 #include "zypp/parser/xml/Reader.h"
20 
22 namespace zypp
23 {
24  namespace xml
26  {
27 
96  template<class _Data>
97  inline void rnParse( const InputStream & input_r, _Data & data_r )
98  {
99  typedef typename _Data::RootNode RootNode;
100  _Data 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:56
void rnParse(const InputStream &input_r, _Data &data_r)
Parse xml input_r and store data in data_r.
Definition: Parse.h:97
xmlTextReader based interface to iterate xml streams.
Definition: Reader.h:95