If a cscript is called from an XML element, the script automatically gets access to a reference to that element. XMLPaths are strings which refer to that element or root.
The paths' structure is based on an extended version of the UNIX path syntax. If an element of a path cannot be found, the processing of that path is aborted. The following table describes all structures available in a path.
Structure | Description |
/ | Path divider, when at the beginning of a path, start at root. |
.. | move up one layer |
name[[i]] | i-th Element in the current layer whose tag is equal to name. The name is case sensitive. The suffix [i] is optional, if it is omitted, the first element name is used. The numbering is 1 based. |
first|next|prev|last[+-i] | The i-th element after / before the specified element. If the optional i is omitted, the specified element is returned. The numbering is 1 based. |
first|next|prev|last[<tag>] | The first element after / before the specified element with the specified tag tag. |
self | The current element. The path may not have any other elements. |