Official Content

Creates an attribute in the current element.

Syntax

&DataType.WriteAttribute(AttName, AttValue)

Where:
AttName
   Attribute name

AttValue
   Attribute value

Scope

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

Description

Creates an attribute in the current element, that is the one 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.

See Also

XmlWriter Data Type
WriteStartElement
WriteElement


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant