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: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.