Please enable JavaScript to view this site.

Take Command / TCC Help v. 27

@XMLHASXPATH[["filename",],xpath] : Returns 1 if the xpath exists in the XML file, or 0 if it doesn't.

 

If you do not specify a filename, @XMLHASXPATH will use the file previously opened by @XMLOPEN.

 

@XMLHASXPATH may be used to check if an xpath exists before setting it via @XMLXPATH.

 

The XML parser in TCC implements a subset of the XML XPath specification, allowing you to point to specific elements in the XML documents. The xpath is a series of one or more element accessors separated by '/'. The path can be absolute (starting with '/') or relative to the current XPath location.

The following are possible values for an element accessor:

'name'

A particular element name

name[i]

The i-th subelement of the current element with the given name

[i]

The i-th subelement of the current element

[last()]

The last subelement of the current element

[last()-i]

The subelement located at the last location minus i in the current element

name[@attrname="attrvalue"]

The subelement containing a particular value for a given attribute (supports single AND double quotes)

..

The parent of the current element