Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

LibXMLHelper.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013 File:       LibXMLHelper.h
00014 
00015 Author:     Michael Radziej <mir@suse.de>
00016 Maintainer: Michael Radziej <mir@suse.de>
00017 
00018 Purpose:    Helper class to deal with libxml2 with C++
00019 
00020 /-*/
00021 #ifndef LibXMLHelper_h
00022 #define LibXMLHelper_h
00023 #include <string>
00024 
00025 extern "C" {
00026   struct _xmlNode;
00027   typedef _xmlNode xmlNode;
00028 }
00029 
00034 class LibXMLHelper {
00035 public:
00044   LibXMLHelper();
00045 
00049   virtual ~LibXMLHelper();
00050 
00058   std::string attribute(xmlNode * node, 
00059                         const std::string &name, 
00060                         const std::string &defaultValue = std::string()) const;
00061 
00070   std::string content(xmlNode * nodePtr) const;
00071 
00077   std::string name(const xmlNode * nodePtr) const;
00078 
00084   bool isElement(const xmlNode * nodePtr) const;
00085 
00092   std::string positionInfo(const xmlNode * nodePtr) const;
00093 };
00094 
00095 #endif

Generated on Fri Feb 24 00:30:02 2006 for liby2util by  doxygen 1.4.4