This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > %SYS namespace > %XML.Element


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 (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property Attributes as %String [ Private , MultiDimensional ];
Internal array of attribute name/value pairs.
Property methods: AttributesDisplayToLogical(), AttributesGet(), AttributesIsValid(), AttributesLogicalToDisplay(), AttributesLogicalToOdbc(), AttributesNormalize(), AttributesSet()
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()

Methods (Including Private)

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 (Including Private)