Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    append

    Syntax

    append name += value;

    Release Information

    Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.

    Description

    Append a value to the node set contained in a mutable variable. The variable must be defined using the mvar statement.

    Attributes

    name
    —

    Name of the mutable variable.

    value
    —

    Value to append to the node set.

    SLAX Example

    The following snippet appends the <item> element and <name> and <size> child elements to the node set contained in the mutable variable block:

    mvar $block;
    set $block = <block> "item list";
    
    for $item (list) {
        append $block += <item> {
            <name> $item/name;
            <size> $item/size;
        }
    }
    

    Published: 2013-03-05