Returning Arrays

Many times multiple items are returned from XML functions, such as xmlTreeGetChildren(), or xmlTreeXPathExecute(). These multiple results are put into a Vortex array, and can be <loop>ed over just like anything else.

<$children = (xmlTreeGetChildren($parent))>
<if '' eq $children>
    No children for parent.
<else>
    <loop $children>
        <$name = (xmlTreeGetName($children))>
        <$type = (xmlTreeGetType($children))>
        child $name is $type
    </loop>
</if>


Copyright © Thunderstone Software     Last updated: Dec 10 2018
Copyright © 2019 Thunderstone Software LLC. All rights reserved.