|
TorqueScript Reference
|
Inherits SimObject.
| void addComment | ( | string | comment | ) |
Add the given comment as a child of current stack element.
| comment | The desired comment to add |
| void addData | ( | string | text | ) |
Add the given text as a child of current stack element.
| The | desired text to add |
| void addHeader | ( | ) |
Add XML header to document.
| void addNewElement | ( | string | name | ) |
Create new element as child of current stack element and push new element on to stack.
| name | The anme of the new element |
| void addText | ( | string | text | ) |
Add the given text as a child of current stack element.
| text | The desired text to add |
| String attribute | ( | string | attribute | ) |
Get attribute value if it exists.
| attribute | The desired SimXMLDocument attribute |
| Boolean attributeExists | ( | string | attribute | ) |
Get true if named attribute exists.
| attribute | The desired attribute's name |
| Float attributeF32 | ( | string | attribute | ) |
Get attribute value if it exists.
| attribute | The desired SimXMLDocument attribute |
| Integer attributeS32 | ( | string | attribute | ) |
Get attribute value if it exists.
| attribute | The desired SimXMLDocument attribute |
| void clear | ( | ) |
Clear contents of XML document.
| void clearError | ( | ) |
Clear error description.
| String elementValue | ( | ) |
Get element value if it exists.
| String firstAttribute | ( | ) |
Obtain the name of the current element's first attribute.
| String getData | ( | ) |
Gets the text from the current stack element.
| String getErrorDesc | ( | ) |
Get current error description.
| String getText | ( | ) |
Gets the text from the current stack element.
| String lastAttribute | ( | ) |
Obtain the name of the current element's last attribute.
| Integer loadFile | ( | string | fileName | ) |
Load file from given filename.
| fileName | The name of the desired file |
| String nextAttribute | ( | ) |
Get the name of the next attribute for the current element after a call to firstAttribute().
| Boolean nextSiblingElement | ( | string | name | ) |
Set top element on stack to next element with given name.
| name | The name of the element. |
| Integer parse | ( | string | txtXML | ) |
Create document from XML string.
| txtXML | The text of the XML document |
| void popElement | ( | ) |
Pop last element off of stack.
| String prevAttribute | ( | ) |
Get the name of the previous attribute for the current element after a call to lastAttribute().
| Boolean pushChildElement | ( | int | index | ) |
Push the child element at the given index onto stack.
| index | A nonnegative integer representing the index of the child element |
| Boolean pushFirstChildElement | ( | string | name | ) |
Push first child element with given name onto stack.
| name | The name of the child element |
| void pushNewElement | ( | string | name | ) |
Create new element as child of current stack element and push new element on to stack.
| name | The anme of the new element |
| String readComment | ( | S32 | index | ) |
Returns the comment at the specified index.
| index | The index of the desired comment as a nonnegative integer value |
| void removeText | ( | ) |
Remove any text on the current stack element.
| void reset | ( | ) |
Set this to default state at construction.
| Integer saveFile | ( | string | fileName | ) |
Save file to given filename.
| fileName | A string presenting the filename to save the XML document as |
| void setAttribute | ( | string | attributeName, |
| string | attributeValue | ||
| ) |
Set attribute of top stack element to given value.
| attributeName | The name of the attribute of the element you wish to set |
| attributeValue | The value you wish to set the given attribute to |
| void setObjectAttributes | ( | string | attributeValue | ) |
Set attribute of top stack element to given value.
| attributeValue | The value you wish to set the given attribute to |
1.8.10