DOMNodeWriter.WriteAttribute

Syntax variant: Writing an attribute with a full name

Syntax:

WriteAttribute(<FullName>, <Value>)

Parameters:

<FullName> (required)

Type: String.
An attribute's full name. Can include a prefix.

<Value> (required)

Type: String.
An attribute's value.

Syntax variant: Record of an attribute with a local name and namespace URI

Syntax:

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

Parameters:

<LocalName> (required)

Type: String.
An attribute's local name.

<NamespaceURI> (required)

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

<Value> (required)

Type: String.
An attribute's value.

Description:

Write an element's 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 the element's content.

Example:

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


    

1C:Enterprise Developer's Community