#include <skXMLElementObject.h>
Inheritance diagram for skXMLElementObject:
Public Methods | |
skXMLElementObject () | |
Default Constructor. | |
skXMLElementObject (const skString& location,DOM_Element elem) | |
Constructor which takes an Element. More... | |
~skXMLElementObject () | |
Destructor. | |
int | executableType () const |
Returns XMLELEMENT_TYPE indicating the element is an XMLElementObject. More... | |
int | intValue () const |
float | floatValue () const |
bool | boolValue () const |
char | charValue () const |
skString | strValue () const |
bool | setValue (const skString& s,const skString& attribute,const skRValue& return_value) |
sets the value of an item in the element. More... | |
bool | setValueAt (const skRValue& array_index,const skString& attribute,const skRValue& value) |
Sets a value within the nth element of the XML element. More... | |
bool | getValue (const skString& s,const skString& attribute,skRValue& return_value) |
Retrieves a field from the XML. More... | |
bool | getValueAt (const skRValue& array_index,const skString& attribute,skRValue& value) |
Retrieves the nth value from within the element. More... | |
bool | method (const skString& name,skRValueArray& args,skRValue& ret) |
this method attempts to execute a method stored in the XML. More... | |
void | copyItemsInto (DOM_Element other) |
Clears the other element and does a deep copy of the children of this node into that one. More... | |
DOM_Element | getElement () |
This method returns the XML Element being held by the object. More... | |
void | setAttribute (skString name,const skString& value) |
Sets an attribute on this node. | |
skString | getAttribute (const skString& name) |
This method returns the value of an attribute attached to this element. More... | |
skString | getLocation () const |
This function returns the location associated with this object (typically a file name). | |
Static Public Methods | |
skString | getData (DOM_Element element) |
retrieves the text data from an element. More... | |
void | setData (DOM_Element element,const skString& data) |
sets the text data for a node by looking for the first CDATA and TEXT child node. More... | |
DOM_Element | findChild (DOM_Element parent,const skString& tagname) |
returns a child element. More... | |
DOM_Element | findChild (DOM_Element parent,int index) |
returns the nth child element. More... | |
DOM_Element | findChild (DOM_Element parent,const skString& tagname,const skString& attribute,const skString& value) |
returns a child element with the given attribute set to the given value. More... | |
skString | toString (DOMString str) |
Converts a Xerces DOMString to a Simkin skString. | |
DOMString | fromString (const skString& str) |
Converts a Simkin skString to a Xerces DOMString. | |
int | countChildren (DOM_Element parent) |
this method returns the number of element children of the given element. | |
Protected Methods | |
void | setElement (DOM_Element element) |
This method updates the associated element and clears the parse tree cache. More... | |
Protected Attributes | |
skString | m_ScriptLocation |
the location that the XML document came from. |
The methods getValue, setValue and method all search for matching element tags within the XML document. Only the first matching tag is used. The class uses the Xerces library to access XML documents
The class supports the following fields:
|
Constructor which takes an Element.
|
|
Reimplemented from skExecutable. |
|
Reimplemented from skExecutable. |
|
Clears the other element and does a deep copy of the children of this node into that one.
|
|
Returns XMLELEMENT_TYPE indicating the element is an XMLElementObject.
Reimplemented from skExecutable. |
|
returns a child element with the given attribute set to the given value.
|
|
returns the nth child element.
|
|
returns a child element.
|
|
Reimplemented from skExecutable. |
|
This method returns the value of an attribute attached to this element.
|
|
retrieves the text data from an element.
|
|
This method returns the XML Element being held by the object.
|
|
Retrieves a field from the XML. The first sub-element matching the tag is found. The value returned is an XMLElementObject, unless the attrib value is specified. It also supports the following built-in field: "nodename" - returns the tag name of this element
Reimplemented from skExecutable. |
|
Retrieves the nth value from within the element. If the array index falls within the range of the number of children of this element, a new XMLElementObject encapsulating the child is returned. Reimplemented from skExecutable. |
|
Reimplemented from skExecutable. |
|
this method attempts to execute a method stored in the XML. It searches for an element whose tag matches the method name and if found passes the text for the tag through to the interpeter. The method also supports the following methods to Simkin scripts:
Reimplemented from skExecutable. |
|
sets the text data for a node by looking for the first CDATA and TEXT child node.
|
|
This method updates the associated element and clears the parse tree cache.
|
|
sets the value of an item in the element. The first sub-element matching the tag is found. If the value passed is an element, it is first copied.
Reimplemented from skExecutable. |
|
Sets a value within the nth element of the XML element.
Reimplemented from skExecutable. |
|
Reimplemented from skExecutable. |