Class Reference
IRIS for UNIX 2019.1
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%XML] >  [Adaptor]
Private  Storage   

abstract class %XML.Adaptor

Subclasses of %XML.Adaptor are said to be "XML enabled" and may be projected as either pure XML or as the return value or arguments of a SOAP method.
The methods that are generated for XML enabled classes are specified here. The class parameters that control the generation of these methods are defined here.
The property parameters that control the generation of code for each property of an XML enabled class are defined in %XML.PropertyParameters.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22 17


Summary

Methods
%XMLGenerate XMLAfterExport XMLBeforeExport XMLDTD
XMLExport XMLExportInternal XMLExportToStream XMLExportToString
XMLGetSchemaImports XMLImport XMLImportInternal XMLIsObjectEmpty
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType

Subclasses
%CSP.Mgr.GatewayInformation %CSP.Mgr.GatewaySystemStatus %CSP.Mgr.Helper.AlternativeServer
%CSP.Mgr.Helper.ApplicationPath %CSP.Mgr.Helper.CacheServer %CSP.Mgr.Helper.CachedForms
%CSP.Mgr.Helper.Connection %CSP.Mgr.Helper.Form %CSP.Monitor.Matrix
%CSP.Util.Action %CSP.Util.Condition %CSP.Util.FieldDefinition
%CSP.Util.FormButton %CSP.Util.HTMLMeter %CSP.Util.Link
%CSP.Util.Menu %CSP.Util.MenuItem %CSP.Util.PageInstance
%CSP.Util.Pane %Calendar.Hijri
%DeepSee.Connector.abstractNode %DeepSee.CubeManager.RegistryMap %DeepSee.CubeManager.RegistryMapCube
%DeepSee.CubeManager.RegistryMapGroup %DeepSee.CubeManager.RegistryMapSubjectArea %DeepSee.Dashboard.CalculatedMember
%DeepSee.Dashboard.ChartDataSeries %DeepSee.Dashboard.Control %DeepSee.Dashboard.DataProperty
%DeepSee.Dashboard.PivotCondition %DeepSee.Dashboard.PivotLevel %DeepSee.Dashboard.Widget
%DeepSee.Diagnostic.MDXUtils %DeepSee.ListingGroupDefinition %DeepSee.Model.SubjectArea.abstractNode
%DeepSee.Model.abstractNode %DeepSee.PMML.Definition.abstractNode %DeepSee.QualityMeasure.QualityMeasure
%DeepSee.Query.node %DeepSee.Report.DataView %DeepSee.Report.DataViewField
%DeepSee.Report.Model.Document %DeepSee.Report.Model.Node %DeepSee.SubjectArea
%DeepSee.TestSpec %DeepSee.UserLibrary.Folder %DeepSee.UserLibrary.FolderItem
%DeepSee.UserLibrary.UserData %DeepSee.UserLibrary.WorksheetAxis %DeepSee.UserLibrary.WorksheetCell
%DeepSee.UserPortal.Data.Alert %DeepSee.UserPortal.Data.User %DeepSee.XMLA.DataSourcesRestrictions
%DeepSee.XMLA.EnumerationsRestrictions %DeepSee.XMLA.ExecuteCommand %DeepSee.XMLA.KeywordsRestrictions
%DeepSee.XMLA.KeywordsRowset %DeepSee.XMLA.LiteralsRestrictions %DeepSee.XMLA.Properties
%DeepSee.XMLA.PropertiesRestrictions %DeepSee.XMLA.PropertiesRowset %DeepSee.XMLA.PropertyList
%DeepSee.XMLA.SchemasRestrictions %DeepSee.XMLA.SchemasRowset %DeepSee.extensions.iKnow.conf.Classifier
%DeepSee.extensions.iKnow.conf.Config %DeepSee.extensions.iKnow.conf.Data %DeepSee.extensions.iKnow.conf.Model
%DeepSee.extensions.modelling.conf.Attributes %DeepSee.extensions.modelling.conf.Model %DeepSee.extensions.modelling.conf.Operation
%DeepSee.extensions.modelling.conf.Operator %DeepSee.extensions.modelling.conf.Sort %Document.Model.Schema.abstractNode
%Document.Object %Installer.Component %JSON.Mapping
%JSON.MappingProperty %Library.SQLConnection %MFT.FolderContents
%MFT.ItemInfo %MFT.UserInfo %MFT.UserList
%Monitor.Manager %Net.MIMESerialPart
%Net.OpenAM.tns.AccessDenied %Net.OpenAM.tns.DuplicateObject %Net.OpenAM.tns.GeneralFailure
%Net.OpenAM.tns.InvalidCredentials %Net.OpenAM.tns.InvalidPassword %Net.OpenAM.tns.InvalidToken
%Net.OpenAM.tns.NeedMoreCredentials %Net.OpenAM.tns.ObjectNotFound %Net.OpenAM.tns.TokenExpired
%Net.OpenAM.tns.UserNotFound %Net.OpenAM.tns.attribute %Net.OpenAM.tns.identityDetails
%Net.OpenAM.tns.token %Net.OpenAM.tns.userDetails %REST.RESTSpec
%SAML.Action %SAML.AssertionReference %SAML.Attribute
%SAML.AttributeValue %SAML.AttributeValueAbstract %SAML.AttributeValueElement
%SAML.AuthnContext %SAML.AuthnContextDecl %SAML.AuthnContextDeclRef
%SAML.BaseID %SAML.Condition %SAML.Conditions
%SAML.EncryptedElement %SAML.Evidence %SAML.Statement
%SAML.Subject %SAML.SubjectConfirmation %SAML.SubjectConfirmationData
%SAML.SubjectLocality %SOAP.Descriptor %SOAP.Fault
%SOAP.Fault12 %SOAP.Fault12.Code %SOAP.Fault12.Text
%SOAP.Header %SOAP.PolicyReference
%SOAP.RM.Accept %SOAP.RM.AcknowledgementRange %SOAP.RM.CloseSequenceResponse
%SOAP.RM.CreateSequenceResponse %SOAP.RM.Offer %SOAP.RM.TerminateSequenceResponse
%SOAP.RequestMessage %SOAP.Security.Created %SOAP.Security.Element
%SOAP.Security.IssuerSerial %SOAP.Security.KeyIdentifier %SOAP.Security.Password
%SOAP.Security.Reference %SOAP.Security.TransformationParameters %SOAP.WSSC.Properties
%SOAP.WST.AbstractToken %SOAP.WST.Claims %SOAP.WST.Entropy
%SOAP.WST.Lifetime %SOAP.WST.Participants %SOAP.WST.Renewing
%SOAP.WST.RequestSecurityTokenResponse %SOAP.WST.RequestSecurityTokenResponseCollection %SOAP.WST.RequestedProofToken
%SOAP.WST.RequestedSecurityToken %SOAP.WST.Status %SOAP.WST.Target
%SQL.Manager.QButtons.Base %SQL.Util.TuneTableStats %SQL.Util.TuneTableStatsFields
%SQL.Util.TuneTableStatsMaps %SYNC.SyncSetObject %SYS.Audit
%SYS.OpenAM.IdentityServices %SYS.PhoneProviders
%SYS.Portal.Resources %SYS.Portal.Users %SYS.Task.DiagnosticReport
%SYS.X509Credentials %Studio.BreakPoint
%Studio.Extension.Menu %Studio.Extension.MenuBase %Studio.Extension.MenuItem
%Studio.Project %Studio.ProjectItem %Studio.SourceControl.ItemSet
%Studio.Template.HTMLAttribute %Studio.Template.HTMLElement %Studio.WatchPoint
%Studio.WatchVariable
%UnitTest.Result.TestAssert
%UnitTest.Result.TestCase %UnitTest.Result.TestInstance %UnitTest.Result.TestMethod
%UnitTest.Result.TestSuite %WebStress.Calls %WebStress.Control
%WebStress.Control.AppServers %WebStress.Control.GeneratorStatus %WebStress.Control.Processes
%WebStress.Control.Progress %WebStress.Control.ValidData.Request %WebStress.Control.ValidData.Request.Parameters
%WebStress.Control.ValidData.Response %WebStress.Control.ValidData.Response.Generators %WebStress.Control.ValidData.Response.Generators.Data
%WebStress.Errors %WebStress.Iterations %WebStress.Machines.ApplicationServers
%WebStress.Machines.Generators %WebStress.Machines.WebServers %WebStress.Playback
%WebStress.Playback.Session %WebStress.Playback.Status %WebStress.Results.AppServerStats
%WebStress.Results.Calls %WebStress.Results.General %WebStress.Results.Iterations
%WebStress.Results.PageSummary %WebStress.Results.Summary %WebStress.Run
%WebStress.Scripts %WebStress.Scripts.URLS %WebStress.Scripts.URLS.Parameters
%WebStress.Tables.NoDelay %WebStress.Tables.NoResults %WebStress.Tests
%WebStress.Tests.Parameters %XGEN.AbstractElement %XML.Catalog
%XML.DataSet %XML.ElementExtension %XML.Exchange.Adaptor
%XML.Exchange.Metadata %XML.Security.Algorithm %XML.Security.CipherData
%XML.Security.CipherDataStream %XML.Security.CipherReference %XML.Security.DSAKeyValue
%XML.Security.DataReference %XML.Security.EncryptionMethod %XML.Security.EncryptionProperties
%XML.Security.EncryptionProperty %XML.Security.InclusiveNamespaces %XML.Security.KeyInfo
%XML.Security.KeyInfoClause %XML.Security.KeyReference %XML.Security.Object
%XML.Security.RSAKeyValue %XML.Security.Reference %XML.Security.SignedInfo
%XML.Security.Transform %XML.Security.X509DataElement
%ZEN.Component.object
%ZEN.Report.Display.common %ZEN.Report.Display.node %ZEN.Report.Models.Group.Document
%ZEN.Report.Models.Group.Group %ZEN.Report.Models.Group.Report %ZEN.Report.parameter
%ZEN.Report.reportNode %ZEN.SVGComponent.abstractSVGGroup %iKnow.Classification.Definition.node
Config.CommonMethods
Config.NLS.Locales Config.NLS.SubTables Config.NLS.Tables
INFORMATION.SCHEMA.STATEMENTCHILDREN INFORMATION.SCHEMA.STATEMENTDAILYSTATS
INFORMATION.SCHEMA.STATEMENTLOCATIONS INFORMATION.SCHEMA.STATEMENTPRIVACTIONS INFORMATION.SCHEMA.STATEMENTPRIVOBJECTS
INFORMATION.SCHEMA.STATEMENTRELATIONS INFORMATION.SCHEMA.STATEMENTS Inventory.Component
Inventory.Scan PKI.CSR PKI.Certificate
SYS.History.Daily SYS.History.Hourly SYS.History.PerfData
SYS.History.SharedMemoryData SYS.History.SysData SYS.Monitor.Health.Chart
SYS.Monitor.Health.Period
SYS.Monitor.Health.SensorObject SYS.Stats.Manager SYS.WSMon.wsEvent
SYS.WSMon.wsResource
Security.Applications Security.DocDBs
Security.Domains Security.Events Security.KMIPServer
Security.LDAPConfigs Security.Resource Security.Resources
Security.Roles Security.SQL Security.SQLAdminPrivilegeSet
Security.SQLPrivileges Security.SQLRoleGrantOption Security.SSLConfigs
Security.Services Security.System Security.Users
Security.X509Users

Parameters

• parameter ATTRIBUTEQUALIFIED;
ATTRIBUTEQUALIFIED controls the format of exported XML by controlling whether attributes are qualified by a prefix. Possible values are 1 for qualified, 0 for not qualified(default). The ATTRIBUTEQUALIFIED specification should be based on the ATTRIBUTEFormDefault attribute of the schema that defines the type. NOTE: Direct use of XMLExport method does not support the ATTRIBUTEQUALIFIED The export must be done using %XML.Writer or SOAP support.
• parameter ELEMENTQUALIFIED;
ELEMENTQUALIFIED controls the format of exported XML. The ELEMENTQUALIFIED specification should be based on the elementFormDefault attribute of the schema that defines the type. To maintain compatibility, ELEMENTQUALIFIED will default to 1 (true) for literal format export and will default to 0 (false) for encoded or encoded12 format export. These were the values always previously assumed for the elementFormDefault attribute. NOTE: Direct use of XMLExport method does not support the ELEMENTQUALIFIED. The export must be done using %XML.Writer or SOAP support.
• parameter NAMESPACE;
NAMESPACE specifies the XML namespace to be used when projecting the class to XML. if NAMESPACE - "", the default namespace is used for the XML schema is used as the namespace for his class.
• parameter SUPPRESSTYPEPREFIX;
SUPPRESSTYPEPREFIX allows the type name that refers to this class when used in an xsi:type attribute to have no prefix. The prefix may be left out of the type's QName by setting SUPPRESSTYPEPREFIX=1. This usage corresponds to an included schema for this class which has no targetNamespace. The default is false which will include the prefix in the type QName.
• parameter XMLDEFAULTREFERENCE;
XMLDEFAULTREFERENCE specifies the default value of the XMLREFERENCE property parameter that specifies how to project references to XML. XMLREFERENCE may be specified for each property to override this default value. Possible values of XMLDEFAULTREFERENCE are SUMMARY, COMPLETE, ID, OID, GUID.
SUMMARY indicates that only the summary properties of the referenced class are used to represent the reference. SUMMARY is the default. Note that by default all properties of the referenced class are in the summary.
COMPLETE indicates that all properties of the referenced class are used to represent the reference.
ID indicates that the id of a persistent or serial class is used to represent the reference.
OID indicates that the oid of a persistent or serial class is used to represent the reference. The form of the oid will be classname,id.
GUID indicates the GUID of a persistent class is used to represent the reference.
• parameter XMLENABLED = 1;
If this parameter is true then XML-enabling methods will be generated. Otherwise, the method generators do not produce a runnable method.
• parameter XMLFORMAT;
The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport methods for XML enabled classes to include code for only literal or only encoded format. This allows the generated routines to be significantly smaller since usually both formats are not needed.
If XMLFORMAT="Literal", then only support for literal format import and export is generated.
If XMLFORMAT="Encoded", then only support for SOAP encoded format import and export is generated.
The default is to generate support for both literal and encoded format.
• parameter XMLIGNOREINVALIDATTRIBUTE = 1;
The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected attributes in the XML input. By default (XMLIGNOREINVALIDATTRIBUTE = 1), will ignore unexpected attributes. If XMLIGNOREINVALIDATTRIBUTE is set = 0, then an unexpected attribute will be treated as an error.
• parameter XMLIGNOREINVALIDTAG = 0;
The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected elements in the XML input. The XMLIGNOREINVALIDTAG parameter will only take affect if XMLSEQUENCE = 0 (the default). By default (XMLIGNOREINVALIDTAG = 0), will treat an unexpected element as an error. If XMLIGNOREINVALIDTAG is set = 1 and XMLSEQUENCE = 0, then unexpected elements will be ignored.
• parameter XMLIGNORENULL = 0;
XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag.

If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).

If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.

If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.
• parameter XMLINCLUDEINGROUP = 1;
XMLINCLUDEINGROUP allows the programmer to control whether a class is included in the group of subclasses of a base class that are represented by one XML element. By default (XMLINCLUDEINGROUP = 1), will include the class. Classes may excluded by specifying XMLINCLUDEINGROUP=0.
• parameter XMLINHERITANCE;
If the XMLINHERITANCE parameter is set to "LEFT", then in the case of multiple inheritance XMLImport and XMLExport generate code to order the properties from the left-most class first followed by properties in left to right order of the super class. XMLINHERITANCE"LEFT" is the default. XMLINHERITANCE"RIGHT" is included to use the old right to left property order which is inconsistent with the order in WSDLs and XSDs produced by InterSystems IRIS SOAP and XML libraries.
• parameter XMLMAPPING;
The XMLMAPPING parameter specifies the mapping between a class and a XML schema grouping. The default value, "type", maps a class to an XML schema type. The value "sequence" maps a class to an XML schema sequence group.
• parameter XMLNAME;
This parameter provides the default XMLNAME for the class. If it is empty then the class name will be used to construct a default XML name. The default XMLNAME is used as the top level tag when exporting objects and the export context did not provide an XML container name.
• parameter XMLNIL;
The XMLNIL class parameter controls the use of xsi:nil by XMLExport and nillable attribute by XMLSchema. If XMLNIL=1, then properties of the class with value = "" (null) are XMLExported as <propname xsi:nil="true" />. The exception is that string properties with value = "" are always exported as <propname /> if XMLIGNORENULL=1 even if XMLNIL=1.
• parameter XMLNILNOOBJECT;
The XMLNILNOOBJECT parameter allows creation of an object to be skipped for elements with xsi:nil="true".
The default of XMLNILNOOBJECT = 0 will always create an object for an element with xsi:nil="true".
If XMLNILNOOBJECT = 1, then elements with xsi:nil="true" and no attributes specified will be skipped, i.e. the value of the property will remain "".
• parameter XMLPREFIX;
The XMLPREFIX parameter controls the prefix to be used for the XML namespace that is given by the NAMESPACE parameter.
• parameter XMLSEQUENCE = 0;
If the XMLSEQUENCE = 1, then the order of the XML elements must match the order of the class properties. This allows us to deal with XML where the same field appears multiple times and is distinguished by the order.
• parameter XMLSUMMARY;
The summary fields to be used when an object is referenced are specified by the object's XMLSUMMARY class parameter. XMLSUMMARY is a comma separated, unordered list of properties to include in the object summary. Properties are mapped to the XML in the order that the properties appear in the class not in the list order. If XMLSUMMARY is not specified then all properties are included in the summary.
• parameter XMLTYPE;
This parameter provides the default XMLTYPE for the class. If it is empty then the class name will be used to construct a default XML type. The default XMLTYPE is used when naming and referencing this type in a schema and the schema context did not provide an XML type name.
• parameter XMLUNSWIZZLE;
If the XMLUNSWIZZLE parameter is set to 1, then single object references in this persistent class will be unswizzled after being exported. List elements will continue to always be unswizzled after export independent of this parameter.
• parameter XMLUSEEMPTYELEMENT;
If the XMLUSEEMPTYELEMENT parameter is set to 1, then the empty element shorthand () is used to represent empty elements. Otherwise is used. The parameter applies to the class in which it appears when none of its properties appear as elements in the XML export, and for any empty xsd:string valued child elements. The XMLUSEEMPTYELEMENT parameter does to apply to objects referenced as properties. The class for a referenced object must have its own XMLUSEEMPTYELEMENT parameter.

Methods

• classmethod %XMLGenerate()
%XMLGenerate controls the generation of the other methods in %XML.Adaptor. If XMLGenerate is overridden, then XML meta data and the other generator methods of %XML.Adaptor will not be created.

This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.

• abstract method XMLAfterExport(status As %Status)
Callback at the end of XMLExport This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.
• abstract method XMLBeforeExport()
Callback at the beginning of XMLExport This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.
• classmethod XMLDTD(top As %String, format As %String, input As %Boolean, ByRef dtdlist) as %Status
Write the DTD to the current device for this XML enabled class serialized as an XML document.

top is the optional tag to be used for the top-level tag.

format is the parameter formatting type. DTDs may only be generated for the default "literal" format.

input=true means that the DTD for the input XML will be generated, otherwise the DTD for the output XML will be generated. The default is input=false. Normally, this argument is not relevant since the all properties of a class participate in input and output.

The dtdlist argument is used internally to track DTD generation for referenced objects.

• method XMLExport(top As %String, format As %String, namespaces As %XML.Namespaces, attrs, createId As %String, typeAttr As %String, ByRef oreflist, ByRef idlist, initialIndent As %String, local As %Boolean, mimeAttachments As %Net.MIMEPart) as %Status
Serialize an XML enabled class as an XML document and write it to the current device.

IMPORTANT: The XMLExport method does not directly support many of the XML parameters. If you want control of the format of the export, do not use this method. Instead create an instance of %XML.Writer and use its OutputToDevice() method.

The supported arguments for XMLExport are:

top is the optional tag to be used for the top-level tag.

format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.

**********
**********
All the following arguments are for internal use only and may change
**********
**********
namespaces is the %XML.Namespaces class instance for this XML document. Instead of namespaces typesPrefix is still supported for compatability and is the optional namespace prefix to be used for all element tags and ObjectScript types.

attrs is a multidimensional array of extra attributes for the top node:
attrs is number of attributes
attrs(i) is name of ith attribute
attrs(i,0) is value of the ith attribute

If the createId is not "", then an id field with this id value is created.

If the typeAttr is not "", then add a type attribute to the top element if the this class's name is not typeAttr.

The idlist and oreflist arguments are used internally to track deferred object export and should normally not be specified.

initialIndent is the initial indentation for use when the format is indent.

local specifies if the element is treated as a local element. A global element is specified by a false value of local which can be either 0 to represent a global element in the namespace specified by the namespace argument or a string which is the namespace to which the global element belongs. The default for local is 0.

If the class is to be exported as an XOP package for use by SOAP MTOM, mimeAttachments is the MIME part which contains the list of MIME parts for all the attachments in the XOP package.

• method XMLExportInternal() as %Status
XMLExportInternal is internal method used by XMLExport
• method XMLExportToStream(ByRef export As %Stream.Object, top As %String, format As %String, namespaces As %XML.Namespaces, attrs, createId As %String, typeAttr As %String, ByRef oreflist, ByRef idlist, initialIndent As %String) as %Status
Serialize an XML enabled class as an XML document and appends it to a stream.

IMPORTANT: The XMLExportToStream method does not directly support many of the XML parameters. If you want control of the format of the export, do not use this method. Instead create an instance of %XML.Writer and use its OutputToStream() method.

The supported arguments for XMLExportToStream are:

export is the exported stream. If export is the oref of a stream, the XML document will be written to this existing stream at the current position. If export is "", then a new %FileCharacterStream will be created to contain the XML document and its oref returned. In this case, export must be passed by reference.

top is the optional tag to be used for the top-level tag.

format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.

**********
**********
All the following arguments are for internal use only and may change

**********
**********
namespaces is the %XML.Namespaces class instance for this XML document. Instead of namespaces typesPrefix is still supported for compatability and is the optional namespace prefix to be used for all element tags and ObjectScript types.

attrs is a multidimensional array of extra attributes for the top node:
attrs is number of attributes
attrs(i) is name of ith attribute
attrs(i,0) is value of the ith attribute

If the createId is not "", then an id field with this id value is created.

If the typeAttr is not "", then add a type attribute to the top element if the this class's name is not typeAttr.

The idlist and oreflist arguments are used internally to track deferred object export and should normally not be specified.

initialIndent is the initial indentation for use when the format is indent.

• method XMLExportToString(ByRef export As %String, top As %String, format As %String, namespaces As %XML.Namespaces, attrs, createId As %String, typeAttr As %String, ByRef oreflist, ByRef idlist, initialIndent As %String) as %Status
Serialize an XML enabled class as an XML document and write it to a string.

IMPORTANT: The XMLExportToString method does not directly support many of the XML parameters. If you want control of the format of the export, do not use this method. Instead create an instance of %XML.Writer and use its OutputToString() method.

The supported arguments for XMLExportToString are:

top is the optional tag to be used for the top-level tag.

format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.

**********
**********
All the following arguments are for internal use only and may change
**********
**********
namespaces is the %XML.Namespaces class instance for this XML document. Instead of namespaces typesPrefix is still supported for compatability and is the optional namespace prefix to be used for all element tags and ObjectScript types.

attrs is a multidimensional array of extra attributes for the top node:
attrs is number of attributes
attrs(i) is name of ith attribute
attrs(i,0) is value of the ith attribute

If the createId is not "", then an id field with this id value is created.

If the typeAttr is not "", then add a type attribute to the top element if the this class's name is not typeAttr.

The idlist and oreflist arguments are used internally to track deferred object export and should normally not be specified.

initialIndent is the initial indentation for use when the format is indent.

local specifies if the element is treated as a local element. Default is 0 (false).

• classmethod XMLGetSchemaImports(ByRef imports, ByRef classes) as %Status
Get the import elements required for a schema. XMLGetSchemaImports is used to get the import elements needed for %XML.DataSet in a WSDL file.

The schema is is returned as a local array of where each node represents a required import:
imports(schemaNamespace)=schemaLocation
where schemaLocation may be "" for commonly known schemas such as http://www.w3.org/2001/XMLSchema

This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.

• method XMLImport(top As %String, format As %String, namespace As %String, handler As %XML.Document, node As %Integer, ByRef idlist, keynameattr As %String, mimeAttachments As %ListOfObjects) as %Status
Import an XML document as a class.

This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.

top is the optional tag to be expected for the top-level tag.

format is the parameter formatting type ("literal", "encoded", "encoded12") to be used for this object. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.

namespace is the uri of the target namespace for this document that is being imported.

handler is the %XML.Document that holds the imported XML tree.

The idlist argument is used internally to track nodes identified by an id attribute for later reference.

keynameattr is the key name attribute specified for array elements.

If the class is to be imported from an XOP package for use by SOAP MTOM, mimeAttachments is the list of MIME parts for all the attachments in the XOP package.

• private method XMLImportAttributes() as %Status
Import attributes of an XML document as a class.
This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.

• method XMLImportInternal() as %Status
XMLImportInternal is internal method used by XMLImport
• method XMLIsObjectEmpty(ignoreNull As %Boolean) as %Boolean
Test if a serial class has the values of the initial empty class.
This method is for internal use only. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this method.

• classmethod XMLNew(document As %XML.Document, node As %Integer, containerOref As %RegisteredObject = "") as %RegisteredObject
Get an instance of an XML enabled class.

You may override this method to do custom processing (such as initializing the object instance) before returning an instance of this class. However, this method should not be called directly from user code.
Arguments:
document is the document with %XML.Node or macros in %xmlDOM.inc.
nodeId is a node id of the node which defines this object. An %XML.Node object may be obtained for this node using document.GetNode(nodeId)
containerOref is the containing object instance when called from XMLImport and is "" when called from %XML.Reader for Correlate'd objects.
• classmethod XMLSchema(top As %String = "", format As %String = "", namespacePrefix As %String = "", input As %Boolean = 0, refOnly As %Boolean = 0, ByRef schema) as %Status
Write an XML Schema fragment to the current device which describes an XML enabled class and dependent classes. The output of the XMLSchema method is not a complete sachema. The %XML.Schema class must be used to output a complete schema. In order to override schema generation the XMLSchemaType method should be overridden -- not the XMLSchema method.

top is the optional tag to be used for the top-level tag.

format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. In addition, the value "element" is the same as "literal" formatting with an element at the top level. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.

namespacePrefix is the optional namespace prefix to be used for the namespace in which this schema is generated.

input=true means that the schema for the input XML will be generated, otherwise the schema for the output XML will be generated. The default is input=false. Normally, this argument is not relevant since the all properties of a class participate in input and output.

refOnly=true means that only the portions of the schema for referenced types are generated. The schema for this class is not generated. Default is refOnly=false that generates the entire schema.

The schema argument is used internally to track schema generation for referenced objects.

• classmethod XMLSchemaNamespace() as %String
Get the namespace to which this class belongs for use in schema generation. The namespace is returned as a string or $c(0) is returned to indicate that the namespace of the referencing class should be used. This method should not normally need to be overridden.
• abstract classmethod XMLSchemaType(schemaInstance As %XML.Schema, node As %XML.Node, top As %String = "", encoded As %Boolean, summary As %Boolean = 0, input As %Boolean = 0, refOnly As %Boolean = 0) as %Status
Add a complexType to the schema that is respresented by an %XML.Schema instance.

schemaInstance is the %XML.Schema class instance that is used to build the schema.

node is the %XML.Node class instance for the schema that includes this class.

top is the optional override of the type name.

format is the parameter formatting type ("literal", "encoded" or "encoded12") to be used for this object. In addition, the value "element" is the same as "literal" formatting with an element at the top level. The default value for format is "" which currently is the same as the "literal" formatting, but may be a unique encoding in the future.

summary=true if summary type is to be created.

input=true means that the schema for the input XML will be generated, otherwise the schema for the output XML will be generated. The default is input=false. Normally, this argument is not relevant since the all properties of a class participate in input and output.

refOnly=true means that only the portions of the schema for referenced types are generated. The schema for this class is not generated. Default is refOnly=false that generates the entire schema.



Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.