RetsXmlParser Class Reference

(Internal) RetsXmlParser is the primary XML Parser class for use with libexpat. More...

#include <librets/RetsXmlParser.h>

Inheritance diagram for RetsXmlParser:

ExpatXmlParser

List of all members.

Public Member Functions

virtual ~RetsXmlParser ()
virtual bool HasNext ()=0
 Indicates whether or not there are additional element to be parsed in this data stream.
virtual RetsXmlEventPtr GetNextEvent ()=0
 Returns next XML event, blocking if necessary.
RetsXmlEventListPtr GetEventList ()
 Returns all remaining events as a vector.
RetsXmlEventPtr GetNextSkippingEmptyText ()
RetsXmlEventListPtr GetEventListSkippingEmptyText ()
 Returns all remaining events as a vector, ingoring all empty text events.
RetsXmlStartElementEventPtr AssertNextIsStartEvent (std::string prefix="")
 Assert that the next event is a start element event.
RetsXmlEndElementEventPtr AssertNextIsEndEvent (std::string prefix="")
 Assert that the next event is an end element event.
RetsXmlTextEventPtr AssertNextIsTextEvent (std::string prefix="")
 Assert that the next event is a text element event.
RetsXmlEndDocumentEventPtr AssertNextIsEndDocumentEvent (std::string prefix="")
 Assert that the next event is the end document event.

Static Public Member Functions

static RetsXmlParserPtr CreateDefault (istreamPtr inputStream)
 Create a default XML parser around the speicified input stream.
static RetsXmlStartElementEventPtr AssertStartEvent (RetsXmlEventPtr event, std::string prefix="")
 Assert that the event is a start element event.
static RetsXmlEndElementEventPtr AssertEndEvent (RetsXmlEventPtr event, std::string prefix="")
 Assert that the event is an end element event.
static RetsXmlTextEventPtr AssertTextEvent (RetsXmlEventPtr event, std::string prefix="")
 Assert that the event is a text element event.
static RetsXmlEndDocumentEventPtr AssertEndDocumentEvent (RetsXmlEventPtr event, std::string prefix="")
 Assert that the event is the end document event.


Detailed Description

(Internal) RetsXmlParser is the primary XML Parser class for use with libexpat.

Constructor & Destructor Documentation

virtual ~RetsXmlParser (  )  [virtual]


Member Function Documentation

static RetsXmlEndDocumentEventPtr AssertEndDocumentEvent ( RetsXmlEventPtr  event,
std::string  prefix = "" 
) [static]

Assert that the event is the end document event.

Parameters:
event A pointer to the object containing the event.
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the event.
Exceptions:
RetsException If the element is not the end document event.

static RetsXmlEndElementEventPtr AssertEndEvent ( RetsXmlEventPtr  event,
std::string  prefix = "" 
) [static]

Assert that the event is an end element event.

Parameters:
event A pointer to the object containing the event.
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the event.
Exceptions:
RetsException If the next element is not an end event.

RetsXmlEndDocumentEventPtr AssertNextIsEndDocumentEvent ( std::string  prefix = ""  ) 

Assert that the next event is the end document event.

A side effect of this call is that the next element in the input stream is parsed.

Parameters:
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the next event.
Exceptions:
RetsException if the next element is not the end document event.

RetsXmlEndElementEventPtr AssertNextIsEndEvent ( std::string  prefix = ""  ) 

Assert that the next event is an end element event.

A side effect of this call is that the next element in the input stream is parsed.

Parameters:
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the next event.
Exceptions:
RetsException if the next element is not an end event.

RetsXmlStartElementEventPtr AssertNextIsStartEvent ( std::string  prefix = ""  ) 

Assert that the next event is a start element event.

A side effect of this call is that the next element in the input stream is parsed.

Parameters:
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the next event.
Exceptions:
RetsException if the next element is not a start event.

RetsXmlTextEventPtr AssertNextIsTextEvent ( std::string  prefix = ""  ) 

Assert that the next event is a text element event.

A side effect of this call is that the next element in the input stream is parsed.

Parameters:
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the next event.
Exceptions:
RetsException if the next element is not a text event.

static RetsXmlStartElementEventPtr AssertStartEvent ( RetsXmlEventPtr  event,
std::string  prefix = "" 
) [static]

Assert that the event is a start element event.

Parameters:
event A pointer to the object containing the event.
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the event.
Exceptions:
RetsException if the element is not a start event.

static RetsXmlTextEventPtr AssertTextEvent ( RetsXmlEventPtr  event,
std::string  prefix = "" 
) [static]

Assert that the event is a text element event.

Parameters:
event A pointer to the object containing the event.
prefix A string to be included when reporting errors.
Returns:
A RetsXmlStartElementEvent pointer to the event.
Exceptions:
RetsException If the element is not a text event.

static RetsXmlParserPtr CreateDefault ( istreamPtr  inputStream  )  [static]

Create a default XML parser around the speicified input stream.

Parameters:
inputStream A pointer to the input stream to be parsed.
Returns:
A pointer to the parser.

RetsXmlEventListPtr GetEventList (  ) 

Returns all remaining events as a vector.

Returns:
Vector of events.

RetsXmlEventListPtr GetEventListSkippingEmptyText (  ) 

Returns all remaining events as a vector, ingoring all empty text events.

Returns:
Vector of events.

virtual RetsXmlEventPtr GetNextEvent (  )  [pure virtual]

Returns next XML event, blocking if necessary.

Returns:
Next XML event
Exceptions:
RetsException 

Implemented in ExpatXmlParser.

RetsXmlEventPtr GetNextSkippingEmptyText (  ) 

virtual bool HasNext (  )  [pure virtual]

Indicates whether or not there are additional element to be parsed in this data stream.

Returns:
TRUE if there is more to be parsed.

Implemented in ExpatXmlParser.


Generated by  doxygen