XDTOSerializer.GetXMLType

Syntax:

GetXMLType(<XMLReader>)

Parameters:

<XMLReader> (required)

Type: XMLReader.
Object from which reading occurs.

Returned value:

Type: XMLDataType; Undefined.
If it is impossible to define XML data type, the Undefined value is returned.

Description:

This method retrieves XML data type that can be currently read from the XMLReader type object. When retrieving XML data type, you can perform a read operation from the XMLReader.
The XML data type is defined by using the following algorithm:
1) Spaces are ignored, if the current position of the XMLReader object corresponds to the "Text" node type, and the node value contains spaces only;
2) If the current node type does not correspond to the StartElement value, the type is undefined;
3) It checks for the "nil" attribute from the "http://www.w3.org/2001/XMLSchema-instance" namespace. If the attribute exists and is set to "true", the type is undefined;
4) It checks for the "type" attribute from the "http://www.w3.org/2001/XMLSchema-instance" namespace. If the attribute exists, then the attribute value is analyzed:
    • The value is split into the namespace prefix and the local name;
    • the namespace prefix in the XMLReader object is used to define the namespace URI.
      • If the corresponding namespace URI is not found, the type is undefined
    • The retrieved local name and namespace URI are used to create an XML data type value.

5) If the type attribute does not exist, the item name is analyzed. If the local name matches one of the type names of the "http://www.w3.org/2001/XMLSchema" namespace, and the item namespace is not defined (is an empty string), the type belongs to the "http://www.w3.org/2001/XMLSchema" namespace.

Availability:

Thin client, server, thick client, external connection, Mobile application (client), Mobile application (server).

Note:

If initial state is current, the read operation is executed.

    

1C:Enterprise Developer's Community