class %XML.Element extends %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.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
3 3


Local Namespace Tagname

%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AddAttribute AttributeCount GetAttribute


• property Local as %Boolean [ InitialExpression = 0 ];
The Local property determines how the tag is qualified for the case of elementFormDefault="unqualified".
• 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 Tagname as %String;
The tagname to be used for the element.


• 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.
Copyright © 1997-2020 InterSystems Corporation, Cambridge, MA