Webmaster  |  Imprint 
C++ Server Pages
Main  |  License  |  Documentation  |  Download 

EntityResolver Class Reference

Entity resolver class which associates entities to resolved entity values. More...

#include <cxxtools/xml/entityresolver.h>

List of all members.

Public Member Functions

 EntityResolver ()
 Constructs a new Resolver object and initializes the entity list using the XML default entities.
virtual ~EntityResolver ()
 Empty destructor.
void clear ()
 Resets the entity list to the XML default entities.
void addEntity (const String &entity, const String &token)
 Adds the given entity and the given resolved entity value (token) to the entity list.
String resolveEntity (const String &entity)
 Returns the resolved entity value (token) for the given entity.


Detailed Description

Entities can be added to this class using the method addEntity(). This method takes the entity and the resolved entity value. To resolve the resolves value for an entity the method resolveEntity() can be used.

Constructor & Destructor Documentation

EntityResolver (  ) 

The constructor calls clear() which clears the entity list and adds the XML default entities.


Member Function Documentation

void clear (  ) 

The default entities are &lt; &gt; &amp; &apos; &quot;

void addEntity ( const String entity,
const String token 
)

To determine the resolved entity value of a entity the method resolveEntity() can be used.

Parameters:
entity A list entry for this entity is created and associated with the also given token.
token The resolved entity value that is associated with the also given entity.

String resolveEntity ( const String entity  ) 

If the entity is not in the list an empty String is returned.

Parameters:
entity The resolved entity value for this entity is returned.
Returns:
The resolved entity or an empty String if the entity is not in the list.

Copyright © 2008 The Tntnet Development Team
Tntnet 1.6