libzypp  11.13.5
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 
25  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