domparser.h

来自「c语言编写的xml解析器可以方便的遍历插入删除节点等操作的」· C头文件 代码 · 共 76 行

H
76
字号
/* xml++.h * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and * are covered by the GNU Lesser General Public License, which should be * included with libxml++ as the file COPYING. */#ifndef __LIBXMLPP_PARSERS_DOMPARSER_H#define __LIBXMLPP_PARSERS_DOMPARSER_H#include <libxml++/parsers/parser.h>#include <libxml++/dtd.h>#include <libxml++/document.h>namespace xmlpp {/** XML DOM parser. * */class DomParser : public Parser{public:  DomParser();  /** Instantiate the parser and parse a document immediately.   * @throw exception   * @param filename The path to the file.   * @param validate Whether the parser should validate the XML.                */    explicit DomParser(const std::string& filename, bool validate = false);  virtual ~DomParser();  /** Parse an XML document from a file.   * @throw exception   * @param filename The path to the file.   */                                                                                                                                                                                                 virtual void parse_file(const std::string& filename);  /** Parse an XML document from a string.   * @throw exception     * @param contents The XML document as a string.   */   virtual void parse_memory(const std::string& contents);  /** Parse an XML document from a stream.   * @throw exception   * @param in The stream.   */   virtual void parse_stream(std::istream& in);  /** Test whether a document has been parsed.  */  operator bool() const;    Document* get_document();  const Document* get_document() const;  protected:  virtual void parse_context();  virtual void release_underlying();    Document* doc_;};} // namespace xmlpp#endif //__LIBXMLPP_PARSERS_DOMPARSER_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?