Availability
$WBGETXML is available for use with all WBSP commands.
Syntax
$WBGETXML{Source|ArrName|NodeName|limit|show}
$WBGETXML[Source|ArrName|NodeName|limit|show]
Parameters
Source - Either Internet address of
the XML file you want to include in your page (URL) or a string value
containing XML code. URL can be either absolute (containing entire address
including protocol, server, path and resource) or relative (to document root of
virtual server if it starts with slash / character, or to the directory where
the WBSP file is located). XML source code must start with
"<?xml"
(without quotations)
ArrName - name that will
be used as prefix for all variables where XML node values will be
stored.
NodeName - Name of the parent node for which
all child nodes will be retrieved
limit - optional parameter.
Contains the number of items to be included in arrays
show - optional
parameter - if set to true (T,ON,1) WhizBase will show the last index
(length-1) of resulting array
Returns
Set of arrays containing values of all child nodes of
NodeName of as well as array containing all
the parent node (NodeName) values (all child nodes in one line separated
by space). Arrays are named following this convention: ArrName_NodeName() and ArrName_NodeName_ChildNodeName(). See the example.
Example
File
XMLSample.xml
After running this example, the resulting page in browser should look like this: