mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
FeedReader plugin
- reserved service id - reworked error codes - added xpath manipulation and basic gui elements in preview dialog git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5514 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
08904bf82f
commit
c7ed9c6df7
23 changed files with 1595 additions and 430 deletions
|
@ -25,16 +25,23 @@
|
|||
#include <string>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
class XPathWrapper;
|
||||
|
||||
class XMLWrapper
|
||||
{
|
||||
public:
|
||||
XMLWrapper();
|
||||
~XMLWrapper();
|
||||
|
||||
XMLWrapper &operator=(const XMLWrapper &xml);
|
||||
|
||||
void cleanup();
|
||||
|
||||
bool readXML(const char *xml);
|
||||
|
||||
xmlDocPtr getDocument() const;
|
||||
xmlNodePtr getRootElement() const;
|
||||
|
||||
std::string nodeName(xmlNodePtr node);
|
||||
std::string attrName(xmlAttrPtr attr);
|
||||
|
||||
|
@ -42,19 +49,20 @@ public:
|
|||
bool getChildText(xmlNodePtr node, const char *childName, std::string &text);
|
||||
|
||||
bool getContent(xmlNodePtr node, std::string &content);
|
||||
bool setContent(xmlNodePtr node, const char *content);
|
||||
|
||||
std::string getAttr(xmlNodePtr node, xmlAttrPtr attr);
|
||||
std::string getAttr(xmlNodePtr node, const char *name);
|
||||
bool setAttr(xmlNodePtr node, const char *name, const char *value);
|
||||
|
||||
xmlNodePtr getRootElement();
|
||||
XPathWrapper *createXPath();
|
||||
|
||||
bool convertToString(const xmlChar *xmlText, std::string &text);
|
||||
bool convertFromString(const char *text, xmlChar *&xmlText);
|
||||
|
||||
protected:
|
||||
xmlDocPtr mDocument;
|
||||
xmlCharEncodingHandlerPtr mCharEncodingHandler;
|
||||
|
||||
bool convertToString(const xmlChar *xmlText, std::string &text);
|
||||
bool convertFromString(const char *text, xmlChar *&xmlText);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue