DifferenceToXmlDoc (UserStatistics function)
Login timestamps difference in xml format (UserStatistics class)
The DifferenceToXmlDoc method returns to an XmlDoc the difference in values between one UserStatistics object and another for all Login (also called "Final") statistics with non-zero values (by default) or for all Login statistics including those with zero values.
Syntax
%doc = userStatistics:DifferenceToXmlDoc( ustatOld, [Zeros= boolean], - [AttributeValues= boolean], - [AttributeNames= boolean], - [NamesToLower= boolean])
Syntax terms
%doc | A Janus SOAP XmlDoc object variable to contain the listing of the difference values of the Login statistics. |
---|---|
%userStatistics | A userStatistics object variable. |
ustatOld | An older UserStatistics object variable for the same user login as userStatistics. |
Zeros | This name required argument (Zeros) is a Boolean value that indicates whether differences with a zero value should be included in the returned data. Zeros is an optional argument that defaults to False, which results in non-zero values only being included. |
AttributeValues | This name required argument is a Boolean value that indicates whether statistic values are to be displayed as text or as value attributes within their XML document elements. For example:<DKRD>1107</DKRD> is text format, and <DKRD value="1107"/> is attribute-value format.
The default value is False, which produces text format. |
AttributeNames | This name required argument is a Boolean value that indicates whether statistic names are to be displayed within their XML document elements as the element name or as the value of a "name" attribute. For example: <DKRD>1107</DKRD> is element-name format, and the following is name-as-attribute format:
<stat name="DKRD"> 1107 </stat> The default value is False, which produces element-name format. |
NamesToLower | This name required argument is a Boolean value that indicates whether statistic names are to be displayed in lowercase characters. The default value is False. |
Examples
-
The display of non-zero difference statistics below is produced by a sequence of statements like the following:
%doc is object xmldoc %statStart is object userstatistics %statEnd is object userstatistics . . . %doc = %statEnd:differencetoXmlDoc(%statStart, zeros=false) %doc:print
The following are sample results:
<UserStatisticsDifferences time="20080903121750819" userNumber="20" loginTime="20080903115821710" baseTime="20080903121750818"> <SQWR>2</SQWR> <MOVE>2</MOVE> <DKAR>2</DKAR> </UserStatisticsDifferences>
- Using the following statement would return all the statistics, including those with a
0
value:%doc = %statEnd:differencetoXmlDoc(%statStart)
See also
- Difference returns the value differences between two UserStatistics objects for the Login statistic you specify.
- DifferenceToString returns a longstring containing the value differences for all, or all non-zero, Login statistics.