Skip to main content

Projection of Other XML-Enabled Classes to XML Types

Projection of Other XML-Enabled Classes to XML Types

For an XML-enabled class or a property that is based on an XML-enabled class, the XML type is determined as follows: If the class has a value for the XMLTYPE parameter, that is used as the type name. Otherwise, the short class name is taken as the XML type name.

For example, consider the following class definitions:

Class GXML.PersonWithAddress Extends (%Persistent, %XML.Adaptor) 
{
Parameter XMLTYPE = "PersonType";

Property Name As %Name;

Property DOB As %Date(FORMAT = 5, MAXVAL = "+$h");

Property HomeAddress As GXML.Address;

}

For an instance of this class, the XML type is PersonType, which is taken from the XMLTYPE parameter.

Suppose that the GXML.Address class does not include the XMLTYPE parameter. In this case, for the <HomeAddress> element, the XML type is Address, which is the short class name.

FeedbackOpens in a new tab