WriteAttribute Method

Official Content
This documentation is valid for:

Creates an attribute in the current element.

Syntax

&DataType.WriteAttribute(AttriName, AttriValue)

Where:
AttriName
   Attribute name

AttriValue
   Attribute value

Description

Creates an attribute in the current element. This is: to the element created with the last invoking to WriteStartElement(ElementName) or WriteElement(ValueName, ElementValue).

Note:

When working with documents with namespace, the WriteAttribute method has a special behavior for certain attributes. If the attribute’s name is ‘xmlns’ or starts with ‘xmlns:’ the attribute’s definition is registered like the definition of a name space. 

Thus, in future invocations of a WriteNSStartElement or WriteNSElement method, it is possible to determine the prefix corresponding to a certain URI.

Scope

Extended Data Types: XmlWriter
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

See Also

XmlWriter Data Type
WriteStartElement
WriteElement