Difference between revisions of "Programmer Guide/Command Reference/POSITION"

From STX Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
 
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
<var>#posId</var> := POSITION <var>xmlfile</var> [*|<var>positionString</var>]
+
<var>#posId</var> := POSITION <var>xmlfile</var> [* | <var>positionString</var>]
  
 
Create a new position identifier for the selected element of the XML file <var>xmlfile</var>. If an asterisk is passed, or if <var>positionString</var> is empty, an identifier, unique to this xmlfile, is automatically generated.
 
Create a new position identifier for the selected element of the XML file <var>xmlfile</var>. If an asterisk is passed, or if <var>positionString</var> is empty, an identifier, unique to this xmlfile, is automatically generated.

Revision as of 18:31, 25 April 2014

#posId := POSITION xmlfile [* | positionString]

Create a new position identifier for the selected element of the XML file xmlfile. If an asterisk is passed, or if positionString is empty, an identifier, unique to this xmlfile, is automatically generated.

Such a position works as a pointer to an element of the XML file. It can be used with the command SET xmlfile POSITION as well as with many macro commands in the classes BDataSet, BStxIni and BXMLDoc.

Note that positionString may not contain a simple integer since it would interfere with internal indexing. If a simple integer is specified as the position string, it will be replaced with a unique identifier. See also IREF.