XMLCanonicalizingWriter.WriteAttribute

Syntax variant: Writing an attribute using full name

Syntax:

WriteAttribute(<FullName>, <Value>)

Parameters:

<FullName> (required)

Type: String.
Attribute full name. Can include a prefix.

<Value> (required)

Type: String.
Attribute value.

Syntax variant: Writing the attribute with local name and namespace URI

Syntax:

WriteAttribute(<LocalName>, <NamespaceURI>, <Value>)

Parameters:

<LocalName> (required)

Type: String.
Attribute local name.

<NamespaceURI> (required)

Type: String.
Namespace URI for a local attribute name.

<Value> (required)

Type: String.
Attribute value.

Description:

Use it to write an item attribute.

Availability:

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

Note:

There can be any number of attributes. An attribute can be identified by full name or local name and namespace URI. Attributes must be written after writing the element start tag but before writing element content.

Example:

XMLReader.WriteStartElement("apple");
XMLReader.WriteNamespaceMapping("nsp", "http://metrics.org");
XMLReader.WriteAttribute("weight", "http://metrics.org", "12.5");
XMLReader.WriteEndElement();


    

1C:Enterprise Developer's Community