XML Script logo
Command _insert
Attribute

index, a string, defaults to 'index'

[optional] the name of the attribute in which to store the current iteration number.

Attribute

quantity, a auto-interpolated number, defaults to '1'

[optional] the number of new elements to create.

Attribute

name, a string

[required] the name of the new element to be created.

Attribute

location, a pointer(s) - creative mode

[required] the path to the point in the tree where the new element is to be grafted.

Description

Creates a new element at the specified location, 'location', in the tree, with the name 'name'. To create attributes of the new element, give the <_insert /> tag <attribute /> subelements with .name and .value attributes. To create content in the new element, give the <_insert /> tag one or more <content /> subelements, the content of which will become the content of the new element. Content defined in <content /> subelements will become real subelements of the new element, unlike the <_set /> tag where only text content can be specified. The <_insert /> tag will create 'quantity' identical elements at the specified location in the tree. The 'index' attribute allows control over where the current iteration number is stored, '$.index' by default.

Examples of use

                                
                        

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited