Programmer Guide/Command Reference/POSITION: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
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.


Such a position works as a pointer to an element of the XML file. It can be used with the command [[Programmer_Guide/Shell_Items/File/SET_FILE#XML_Element_Positions|<code>SET <var>xmlfile</var> POSITION</code>]] as well as with many macro commands in the classes [[Programmer_Guide/Macro_Library/BDataSet|BDataSet]], [[Programmer_Guide/Macro_Library/BSTXIni|BStxIni]] and [[Programmer_Guide/Macro_Library/BXMLDoc|BXMLDoc]].
Such a position works as a pointer to an element of the XML file. It can be used with the command [[Programmer_Guide/Shell_Items/File/SET_FILE#XML:_POSITION|<code>SET <var>xmlfile</var> POSITION</code>]] as well as with many macro commands in the classes [[Programmer_Guide/Macro_Library/BDataSet|BDataSet]], [[Programmer_Guide/Macro_Library/BSTXIni|BStxIni]] and [[Programmer_Guide/Macro_Library/BXMLDoc|BXMLDoc]].


Note that <var>positionString</var> 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 [[XXX|IREF]] and the [[Programmer_Guide/Command_Reference/IREF|<code>IREF</code> command]].
Note that <var>positionString</var> 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 [[XXX|IREF]] and the [[Programmer_Guide/Command_Reference/IREF|<code>IREF</code> command]].

Latest revision as of 11:51, 30 October 2018

#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 and the IREF command.

Navigation menu

Personal tools