Rocket::Core::XMLParser Class Reference

#include <XMLParser.h>

Inheritance diagram for Rocket::Core::XMLParser:
Collaboration diagram for Rocket::Core::XMLParser:

Public Member Functions

 XMLParser (Element *root)
DocumentHeaderGetDocumentHeader ()
const URLGetSourceURL () const
bool PushHandler (const String &tag)
void PushDefaultHandler ()
 Pushes the default element handler onto the parse stack.
const ParseFrame * GetParseFrame () const
 Access the current parse frame.

Static Public Member Functions

static XMLNodeHandlerRegisterNodeHandler (const String &tag, XMLNodeHandler *handler)
static void ReleaseHandlers ()
 Releases all registered node handlers. This is called internally.

Protected Member Functions

virtual void HandleElementStart (const String &name, const XMLAttributes &attributes)
 Called when the parser finds the beginning of an element tag.
virtual void HandleElementEnd (const String &name)
 Called when the parser finds the end of an element tag.
virtual void HandleData (const String &data)
 Called when the parser encounters data.

Data Structures

struct  ParseFrame

Detailed Description

Rocket's XML parsing engine. The factory creates an instance of this class for each RML parse.

Author:
Lloyd Weehuizen

Member Function Documentation

XMLNodeHandler * Rocket::Core::XMLParser::RegisterNodeHandler ( const String tag,
XMLNodeHandler handler 
) [static]

Registers a custom node handler to be used to a given tag.

Parameters:
[in] tag The tag the custom parser will handle.
[in] handler The custom handler.
Returns:
The registered XML node handler.

DocumentHeader * Rocket::Core::XMLParser::GetDocumentHeader (  ) 

Returns the XML document's header.

Returns:
The document header.

const URL & Rocket::Core::XMLParser::GetSourceURL (  )  const

Returns the source URL of this parse.

Returns:
The URL of the parsing stream.

bool Rocket::Core::XMLParser::PushHandler ( const String tag  ) 

Pushes an element handler onto the parse stack for parsing child elements.

Parameters:
[in] tag The tag the handler was registered with.
Returns:
True if an appropriate handler was found and pushed onto the stack, false if not.

const XMLParser::ParseFrame * Rocket::Core::XMLParser::GetParseFrame (  )  const

Access the current parse frame.

Access the current parse frame.

Returns:
The parser's current parse frame.


The documentation for this class was generated from the following files:
  • Include/Rocket/Core/XMLParser.h
  • Source/Core/XMLParser.cpp