libexpatpp 0.1.8
Public Types | Public Member Functions | Static Public Member Functions | List of all members
xmlpp::parser Class Reference

namespace for SAX2 xml Parser based on expat More...

#include <xmlparser.hpp>

Public Types

enum  result : uint8_t {
  OK , NO_DELEGATE , ERROR_OPEN_FILE , INVALID_INPUT ,
  XML_BUFFER_ERROR , READ_ERROR , PARSE_ERROR
}
 
enum class  status_t { ERROR = 0 , OK = 1 , SUSPENDED = 2 }
 
enum class  error_t {
  NONE , NO_MEMORY , SYNTAX , NO_ELEMENTS ,
  INVALID_TOKEN , UNCLOSED_TOKEN , PARTIAL_CHAR , TAG_MISMATCH ,
  DUPLICATE_ATTRIBUTE , JUNK_AFTER_DOC_ELEMENT , PARAM_ENTITY_REF , UNDEFINED_ENTITY ,
  RECURSIVE_ENTITY_REF , ASYNC_ENTITY , BAD_CHAR_REF , BINARY_ENTITY_REF ,
  ATTRIBUTE_EXTERNAL_ENTITY_REF , MISPLACED_XML_PI , UNKNOWN_ENCODING , INCORRECT_ENCODING ,
  UNCLOSED_CDATA_SECTION , EXTERNAL_ENTITY_HANDLING , NOT_STANDALONE , UNEXPECTED_STATE ,
  ENTITY_DECLARED_IN_PE , FEATURE_REQUIRES_XML_DTD , CANT_CHANGE_FEATURE_ONCE_PARSING , UNBOUND_PREFIX ,
  UNDECLARING_PREFIX , INCOMPLETE_PE , XML_DECL , TEXT_DECL ,
  PUBLICID , SUSPENDED , NOT_SUSPENDED , ABORTED ,
  FINISHED , SUSPEND_PE , RESERVED_PREFIX_XML , RESERVED_PREFIX_XMLNS ,
  RESERVED_NAMESPACE_URI , INVALID_ARGUMENT
}
 

Public Member Functions

 parser (delegate &delegate, char namespaceSeparator=':')
 
status_t parse (const char *buffer, int len, bool isFinal)
 
error_t errorcode () const
 
size_t current_line_number () const
 
size_t current_column_number () const
 

Static Public Member Functions

static result parseString (const char *pszString, delegate &delegate)
 
static result parseFile (const std::string &filename, delegate &delegate)
 
static const XML_Char * xmlGetAttrValue (const XML_Char **attrs, const XML_Char *key)
 get value of xml attribute identifeid by key from attrs
 

Detailed Description

namespace for SAX2 xml Parser based on expat

Member Function Documentation

◆ xmlGetAttrValue()

const XML_Char * parser::xmlGetAttrValue ( const XML_Char **  attrs,
const XML_Char *  key 
)
static

get value of xml attribute identifeid by key from attrs

Parameters
attrsxml attribute array as array of strings
keyattribute key to search for
Returns
value as pointer to null determined string or nullptr if not found

The documentation for this class was generated from the following files: