Menu
Lumberyard
Legacy Reference

XML Nodes

Flow Graph is deprecated and will be removed in a future version of Lumberyard. Learn about Script Canvas, Lumberyard's new visual scripting environment.

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn about the latest features, see the Amazon Lumberyard User Guide.

You can use the following flow graph nodes to specify XML elements.

ClearValue node

Used to clear the value of the active element.

Inputs

Port Type Description
Execute Any Executes the instruction

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

DeleteAllAttributes node

Used to delete all attributes from the active element.

Inputs

Port Type Description
Execute Any Executes the instruction

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

DeleteAllChildren node

Used to delete all children of the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Optional child name

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

DeleteAttribute node

Used to delete an attribute from the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Optional child name

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

DeleteChild node

Used to delete the first child node with the given name.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Optional child name

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

DeleteChildAt node

Used to delete the nth child node with the given name.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the attribute
Index Integer Location of the child node in the list

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetAttribute node

Used to get the value of an attribute for the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the attribute

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetAttributeCount node

Used to get the number of attributes for the active element.

Inputs

Port Type Description
Execute Any Executes the instruction

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out
Count Integer Outputs the count

GetChild node

Used to navigate to the first child node with the given name.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the attribute
Create Boolean Creates a child node if one does not exist

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetChildAt node

Used to navigate to the nth child node with the given name.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the child node
Index Integer Location of the child node in the list

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetChildCount node

Used to return the number of children of the active element.

Inputs

Port Type Description
Execute Any Executes the instruction

Inputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetParent node

Used to sets the active element to the current active element's parent (move one up).

Inputs

Port Type Description
Execute Any Executes the instruction

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetRoot node

Used to set the active element to the root node (move to top).

Inputs

Port Type Description
Execute Any Executes the instruction

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

GetValue node

Used to get the value of the active element.

Inputs

Port Type Description
Execute Any Executes the instruction

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out
Value Any Outputs the value of the element

HasAttribute node

Used to check if an attribute exists for the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the attribute

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out
Yes Any Has the attribute
No Any Does not have the attribute
Result Boolean Boolean result

IncAttribute node

Used to increment an attribute by the given amount for the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the attribute
Amount Float Amount to increment by

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

IncValue node

Used to increment the value of the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Amount Float Amount to increment by

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

NewChild node

Used to create a new child node at end of parent's sibling list.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the child node
Active Boolean Makes the child node the active element

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

NewDocument node

Used to create a blank document for writing new data into.

Inputs

Port Type Description
Execute Any Executes the instruction
Root String Name of the XML root element

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

OpenDocument node

Used to open an XML document from disk.

Inputs

Port Type Description
Execute Any Executes the instruction
File String File name of the XML document
Location Integer File path of the XML document

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

SaveDocument node

Used to save active XML data to disk.

Inputs

Port Type Description
Execute Any Executes the instruction
File String File name of the saved XML document
Location Integer File path of the XML document
Overwrite Boolean Determines where document should overwrite existing XML document

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

SetAttribute node

Used to set an attribute for the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Name String Name of the attribute to set
Value Any Sets the value of the element

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out

SetValue node

Used to set the value of the active element.

Inputs

Port Type Description
Execute Any Executes the instruction
Value Any Sets the value of the attribute

Outputs

Port Type Description
Success Boolean Called if the instruction executed successfully
Fail Boolean Called if the instruction failed
Done Boolean Called when the instruction has completed carrying out