casa
$Rev:20696$
|
Representation of a single XML token. More...
#include <XMLtoken.h>
Public Member Functions | |
XMLtoken (String n) | |
Constructor that takes the tag name. | |
~XMLtoken () | |
map< String, String > * | getAttributes () |
Returns the attributes for this tag. | |
vector< XMLtoken * > * | getTags () |
Returns the list of content tags, or an empty list if there are none. | |
const String | getName () |
Returns this tag's name. | |
void | setContent (String c) |
Sets the String content of this tag to the given value. | |
const String | getContent () |
Returns the String content of this tag, or blank if there is none. | |
String | getAttribute (String attr) |
Returns the value for the given attribute, or blank if the attribute is invalid. | |
Private Attributes | |
const String | name |
Tag name. | |
String | content |
String content (or blank for none). | |
vector< XMLtoken * > | tags |
Token content (empty list for none). | |
map< String, String > | attributes |
Tag attributes. |
Representation of a single XML token.
XMLtoken encapsulates an XML token which includes a name, zero or more attributes, and optional content which can be a String or one or more XMLtokens.
Definition at line 50 of file XMLtoken.h.
Constructor that takes the tag name.
String casa::XMLtoken::getAttribute | ( | String | attr | ) |
Returns the value for the given attribute, or blank if the attribute is invalid.
map<String, String>* casa::XMLtoken::getAttributes | ( | ) |
Returns the attributes for this tag.
const String casa::XMLtoken::getContent | ( | ) |
Returns the String content of this tag, or blank if there is none.
const String casa::XMLtoken::getName | ( | ) |
Returns this tag's name.
vector<XMLtoken*>* casa::XMLtoken::getTags | ( | ) |
Returns the list of content tags, or an empty list if there are none.
void casa::XMLtoken::setContent | ( | String | c | ) |
Sets the String content of this tag to the given value.
map<String, String> casa::XMLtoken::attributes [private] |
Tag attributes.
Definition at line 89 of file XMLtoken.h.
String casa::XMLtoken::content [private] |
String content (or blank for none).
Definition at line 83 of file XMLtoken.h.
const String casa::XMLtoken::name [private] |
Tag name.
Definition at line 80 of file XMLtoken.h.
vector<XMLtoken*> casa::XMLtoken::tags [private] |
Token content (empty list for none).
Definition at line 86 of file XMLtoken.h.