Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# TiPullXmlElement Class Reference

`#include <tinyxml.h>`

Inheritance diagram for TiPullXmlElement:

[legend]
Collaboration diagram for TiPullXmlElement:

[legend]
List of all members.

## Public Member Functions
| TiPullXmlElement (const char *in_value)
| Construct an element.
virtual | ~TiPullXmlElement ()
const char * | Attribute (const char *name) const
const char * | Attribute (const char *name, int *i) const
const char * | Attribute (const char *name, double *d) const
int | QueryIntAttribute (const char *name, int *value) const
int | QueryDoubleAttribute (const char *name, double *value) const
| QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
TiPullXmlAttribute * | FirstAttribute () const
| Access the first attribute in this element.
TiPullXmlAttribute * | LastAttribute () const
| Access the last attribute in this element.
virtual void | Print (FILE *cfile, int depth) const
## Protected Member Functions
virtual void | StreamOut (TiXmlOutStream *out) const
virtual bool | Parse (ParsePosition in, const char *&out, bool throwaway)
## Private Attributes
TiPullXmlAttributeSet | attributeSet

## Detailed Description

The element is a container class. It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes.

## Constructor & Destructor Documentation

TiPullXmlElement::TiPullXmlElement | ( | const char * | in_value | ) |

| Construct an element.

TiPullXmlElement::~TiPullXmlElement | ( |  | ) | `[virtual]`

## Member Function Documentation

const char * TiPullXmlElement::Attribute | ( | const char * | name,
|  | double * | d
| ) | const

| Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. If the attribute exists and can be converted to an double, the double value will be put in the return 'd', if 'd' is non-null.

const char * TiPullXmlElement::Attribute | ( | const char * | name,
|  | int * | i
| ) | const

| Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists. If the attribute exists and can be converted to an integer, the integer value will be put in the return 'i', if 'i' is non-null.

const char * TiPullXmlElement::Attribute | ( | const char * | name | ) | const

| Given an attribute name, Attribute() returns the value for the attribute of that name, or null if none exists.

TiPullXmlAttribute* TiPullXmlElement::FirstAttribute | ( |  | ) | const`[inline]`

| Access the first attribute in this element.

TiPullXmlAttribute* TiPullXmlElement::LastAttribute | ( |  | ) | const`[inline]`

| Access the last attribute in this element.

bool TiPullXmlElement::Parse | ( | ParsePosition | in,
|  | const char *& | out,
|  | bool | throwaway
| ) | `[protected, virtual]`

| Implements TiPullXmlBase.

void TiPullXmlElement::Print | ( | FILE * | cfile,
|  | int | depth
| ) | const`[virtual]`

| All TinyXml classes can print themselves to a filestream. This is a formatted print, and will insert tabs and newlines. (For an unformatted stream, use the << operator.) Implements TiPullXmlBase.

int TiPullXmlElement::QueryDoubleAttribute | ( | const char * | name,
|  | double * | value
| ) | const

| QueryDoubleAttribute examines the attribute - see QueryIntAttribute().

int TiPullXmlElement::QueryIntAttribute | ( | const char * | name,
|  | int * | value
| ) | const

| QueryIntAttribute examines the attribute - it is an alternative to the Attribute() method with richer error checking. If the attribute is an integer, it is stored in 'value' and the call returns TIXML_SUCCESS. If it is not an integer, it returns TIXML_WRONG_TYPE. If the attribute does not exist, then TIXML_NO_ATTRIBUTE is returned.

void TiPullXmlElement::StreamOut | ( | TiXmlOutStream * | out | ) | const`[protected, virtual]`

| Implements TiPullXmlBase.

## Member Data Documentation

TiPullXmlAttributeSet TiPullXmlElement::attributeSet`[private]`

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

- pull/tinyxml.h
- pull/tinyxml.cpp
- pull/tinyxmlparser.cpp