#include <XMLProductParser.h>
Inheritance diagram for zypp::parser::xmlstore::XMLProductParser:
Public Member Functions | |
XMLProductParser (std::istream &is, const std::string &baseUrl) | |
XMLProductParser () | |
XMLProductParser (XMLProductData_Ptr &entry) | |
virtual | ~XMLProductParser () |
Private Member Functions | |
void | parseProductFlags (XMLProductData_Ptr productPtr, xmlNodePtr node) |
void | parseUpdateUrls (XMLProductData_Ptr productPtr, xmlNodePtr node) |
virtual bool | isInterested (const xmlNodePtr nodePtr) |
filter for the xml nodes The derived class decides which xml nodes it is actually interested in. | |
virtual XMLProductData_Ptr | process (const xmlTextReaderPtr reader) |
process an xml node The derived class has to produce the ENTRYTYPE object here. |
Definition at line 26 of file XMLProductParser.h.
|
|
|
Definition at line 38 of file XMLProductParser.cc. |
|
Definition at line 41 of file XMLProductParser.cc. |
|
Definition at line 29 of file XMLProductParser.cc. |
|
Definition at line 92 of file XMLProductParser.cc. References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::content(), zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), and name. Referenced by process(). |
|
Definition at line 108 of file XMLProductParser.cc. References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::content(), zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), and name. Referenced by process(). |
|
filter for the xml nodes The derived class decides which xml nodes it is actually interested in. For each that is selected, process() will be called an the resulting ENTRYTYPE object used as the next value for the iterator. Documentation for the node structure can be found in the libxml2 documentation. Have a look at LibXMLHelper to access node attributes and contents.
Implements zypp::parser::XMLNodeIterator< XMLProductData_Ptr >. Definition at line 48 of file XMLProductParser.cc. References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::isElement(), and zypp::parser::LibXMLHelper::name(). |
|
process an xml node The derived class has to produce the ENTRYTYPE object here. Details about the xml reader is in the libxml2 documentation. You'll most probably want to use xmlTextReaderExpand(reader) to request the full subtree, and then use the links in the resulting node structure to traverse, and class LibXMLHelper to access the attributes and element contents. fetchNext() cannot throw an error since it will be called in the constructor. Instead, in case of a fundamental syntax error the error is saved and will be thrown with the next checkError().
Implements zypp::parser::XMLNodeIterator< XMLProductData_Ptr >. Definition at line 55 of file XMLProductParser.cc. References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::attribute(), zypp::parser::LibXMLHelper::content(), zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), name, zypp::parser::xmlstore::XMLResObjectParser::parseDependencies(), parseProductFlags(), zypp::parser::xmlstore::XMLResObjectParser::parseResObjectCommonData(), parseUpdateUrls(), and xml_assert. |