Converts the data contained in a subtree to a chosen data type.
Searches the tree and each of its descendants for one whose name is Name
(case-insensitive match). For the first matching subtree found, this node converts the data contained in the subtree to the chosen data type.
The default data type is Text. To choose a different data type, right-click on the output port and select Revert to Generic Data Type, then right-click on it again and select a data type.
If the chosen data type is Text, Integer, Real, or Boolean, this node interprets the subtree’s content as that data type. For example:
Data type | Tree | Output |
---|---|---|
Integer | Tree with content 1024 | 1024 |
Boolean | Tree with content true | true |
If the chosen data type is 2D Point, 3D Point, 4D Point, or Color, this node interprets the subtree’s content or children as the components of that data type. For example:
Data type | Tree | Output |
---|---|---|
2D Point | Tree created from XML <location><x>1.2</x><y>3.4</y></location> | 1.2, 3.4 |
3D Point | Tree created from JSON {"coordinates": {"x":1.2, "y":3.4, "z":5.6}} | 1.2, 3.4, 5.6 |
4D Point | Tree created from XML <point><x>1.2</x><y>3.4</y><z>5.6</z><w>7.8</w></point> | 1.2, 3.4, 5.6, 7.8 |
4D Point | Tree with content 1.2, 3.4, 5.6, 7.8 | 1.2, 3.4, 5.6, 7.8 |
Color | Tree created from JSON {"foreground": {"r":1, "g":0, "b":0, "a":1}} | opaque red |
Color | Tree with content 1.0, 0.0, 0.0, 1.0 | opaque red |
Color | Tree with content #00FF00 | opaque green |
This node is a shortcut for Find Subtrees with Name -> Get First Item in List -> Convert Tree to Value
.
Keywords: convert, element, filter, json, object, search, seek, tag, xml