gloox  1.0.28
Public Member Functions | List of all members
Parser Class Reference

#include <parser.h>

Public Member Functions

 Parser (TagHandler *ph, bool deleteRoot=true)
 
virtual ~Parser ()
 
int feed (std::string &data)
 
void cleanup (bool deleteRoot=true)
 

Detailed Description

This class implements an XML parser.

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
0.9

Definition at line 34 of file parser.h.

Constructor & Destructor Documentation

◆ Parser()

Parser ( TagHandler ph,
bool  deleteRoot = true 
)

Constructs a new Parser object.

Parameters
phThe object to send incoming Tags to.
deleteRootIndicates whether a parsed Tag should be deleted after pushing it upstream. Defaults to true.

Definition at line 22 of file parser.cpp.

◆ ~Parser()

~Parser ( )
virtual

Virtual destructor.

Definition at line 29 of file parser.cpp.

Member Function Documentation

◆ cleanup()

void cleanup ( bool  deleteRoot = true)

Resets internal state.

Parameters
deleteRootWhether to delete the m_root member. For internal use only.

Definition at line 774 of file parser.cpp.

◆ feed()

int feed ( std::string &  data)

Use this function to feed the parser with more XML.

Parameters
dataRaw xml to parse. It may be modified if backbuffering is necessary.
Returns
Returns -1 if parsing was successful. If a parse error occured, the character position where the error has occured is returned.

Definition at line 161 of file parser.cpp.


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