Salesforce

XMLCnt (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

XMLCnt (Magic xpa 2.x)

Returns the number of occurrences of an XML element or an XML attribute according to its path.

Syntax:

XMLCnt(generation, device, element path, attribute name)

Parameters:

generation: A number that represents the task's hierarchic position in the runtime task tree. 0 represents the current task, 1 its immediate ancestor, and so on.

device: A number that represents the sequence number of the I/O device in the current task.

element path: A string that represents the path of an XML element. The syntax is:
/element name[[index]] [/element name[[index]]...]

where:

element name is the name of an XML element. You can assign an alias to the element name. The alias is separated from the element name by a colon symbol (:), for example, al1:My_Element.

index is the index of a specified occurrence of an element that has multiple occurrences. The index value must be greater than 0. Negative values are invalid.

attribute name: The name of an XML attribute that is the attribute of the multi-occurrence element name. Its value is compared to the Value parameter.

Returns:

The number of occurrences of that element in the specified path. Returns 0 if the XML parsing path was not completed, or if the requested element does not exist.

Exceptions:

This function is not supported for Rich Client tasks.

Example:

XMLCnt Example

See also:

XML Namespaces

XML Error Codes

The Online and Rich Client Samples projects (program XM12, XM15, RXM12 and RXM15)

Reference
Attachment 
Attachment