x3d_add_node
Insert an X3D node into an existing scene by providing the scene XML, node XML, and optional parent DEF. The node is added under the specified parent or directly to the scene root if no parent is given.
Instructions
Insert an X3D node into an existing scene.
Parses both the scene and the node XML, inserts the node at the specified
location, and returns the modified scene XML.
Args:
scene_xml: The complete X3D XML document to modify.
node_xml: The X3D node XML fragment to insert. Can be generated using
x3d_generate_node or written manually.
parent_def: Optional DEF name of the parent node. If provided, the node
is inserted as a child of the node with that DEF. If empty,
the node is added as a direct child of <Scene>.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_xml | Yes | ||
| scene_xml | Yes | ||
| parent_def | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |