Skip to main content


class %XML.Element extends %Library.RegisteredObject

The %XML.Element class defines an XML element to be used by %XML.Writer. The tag name, attributes and namespace may be defined. To get a new instance of %XML.Element call %New(tag) where tag is the tagname to be used for the element. The Tagname property may alternatively be set to the tag name.

Property Inventory

Method Inventory


property Local as %Boolean [ InitialExpression = 0 ];
The Local property determines how the tag is qualified for the case of elementFormDefault="unqualified".
Property methods: LocalDisplayToLogical(), LocalGet(), LocalIsValid(), LocalLogicalToDisplay(), LocalNormalize(), LocalSet()
property Namespace as %String;
The Namespace property is set to the namespace to be used for this tag. If Namespace is not set then %XML.Writer will use the default namespace or no namespace if no default is set.
Property methods: NamespaceDisplayToLogical(), NamespaceGet(), NamespaceIsValid(), NamespaceLogicalToDisplay(), NamespaceLogicalToOdbc(), NamespaceNormalize(), NamespaceSet()
property Tagname as %String;
The tagname to be used for the element.
Property methods: TagnameDisplayToLogical(), TagnameGet(), TagnameIsValid(), TagnameLogicalToDisplay(), TagnameLogicalToOdbc(), TagnameNormalize(), TagnameSet()


method AddAttribute(name As %String, value As %String = "", namespace As %String, valueNamespace As %String) as %Status
The AddAttribute() method adds an attribute to this element.
The name and value arguments are required.
The namespace is the optional namespace for the attribute name. If namespace is not specified, then the default namespace is used for the attribute name.
The valueNamespace argument is the namespace for the value. If valueNamespace is not specified (the most usual case), no namespace prefix is used for the value. valueNamespace is used for attributes like xsi:type whose value comes from an XML schema namespace.
method AttributeCount() as %Integer
The AttributeCount() returns the number of attributes.
method GetAttribute(index As %Integer, ByRef name As %String, ByRef namespace As %String, ByRef valueNamespace As %String) as %String
The GetAttribute() returns the specified attribute.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab