DocBook|Search
Class Reference
%XML.Document
   
Server:basexml
Instance:SOAXML
User:UnknownUser
 
-
  [%SYS] >  [%XML] >  [Document]
Private  Storage  

class %XML.Document extends %XML.ImportHandler, %XML.Node

%XML.Document represents an XML document as an Document Object Model (DOM). The DOM may be created either

  • from an XML document by accessing the Document property of %XML.Reader after calling an Openxxx method of %XML.Reader.
  • as a new DOM by calling the CreateDocument of this class.

  • The %XML.Document class maintains the namespaces for the DOM. The %XML.Node class created by GetDocumentElement may be used to navigate the DOM or the macros in %xmlDOM.inc may be used to navigate the DOM based on the DocumentId of %XML.Document.

    Inventory

    Parameters Properties Methods Queries Indices ForeignKeys Triggers
    12


    Summary

    Properties
    Document LocalName Namespace NamespaceIndex Nil
    NodeData NodeId NodeType QName

    Methods
    %%OIDGet %AddToSaveSet %ClassIsLatestVersion %ClassName
    %ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
    %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
    %Extends %GetParameter %IsA %IsModified
    %New %NormalizeObject %ObjectModified %OriginalNamespace
    %PackageName %RemoveFromSaveSet %SerializeObject %SetModified
    %ValidateObject AppendCharacter AppendChild AppendElement
    AttributeDefined CopyDocument CountNamespace CreateDocument
    DocumentSet FindNamespace FirstAttributeName GetAttribute
    GetAttributeNS GetAttributeNamespace GetAttributeQName GetAttributeQNameNS
    GetAttributeValue GetAttributeValueNS GetAttributeValueNamespace GetAttributeValueNamespaceNS
    GetDocumentElement GetDocumentFromStream GetDocumentNode GetNamespace
    GetNode GetNodeById GetNumberAttributes GetText
    GetVersion HasChildNodes InsertCharacter InsertChild
    InsertElement InsertNamespace KillDocument LastAttributeName
    LocalNameGet LocalNameSet LocatePosition Mask
    MoveToFirstChild MoveToLastChild MoveToNextSibling MoveToParent
    MoveToParentElement MoveToPreviousSibling NamespaceGet NamespaceIndexGet
    NamespaceIndexSet NamespaceSet NextAttributeName NilGet
    NilSet NodeDataGet NodeDataSet NodeTypeGet
    NodeTypeSet PopHandler PreviousAttributeName PushHandler
    QNameGet QNameSet Remove RemoveAttribute
    RemoveAttributeNS ReplaceCharacter ReplaceElement ReplaceNode
    Serialize SerializeBase64Node SerializeNode SetAttribute
    SetNodeById SkipFlagGet SkipFlagSet comment
    endCDATA endDTD endDocument endEntity
    ignorableWhitespace processingInstruction skippedEntity startCDATA
    startDTD startEntity


    Methods

    • method CountNamespace() as %Integer
    Return number of namepsaces in document's namespace table.
    • classmethod CreateDocument(localName As %String, namespace As %String) as %XML.Document
    Create a new Document Object Model (DOM) consisting of only a root element.
    • method FindNamespace(namespace As %String) as %Integer
    Return XML nsIndex into document's namespace table for namespace URI.
    • method GetDocumentElement() as %XML.Node
    Returns an %XML.Node DOM navigation object which is positioned at the the root element of this Document.
    • classmethod GetDocumentFromStream(stream As %BinaryStream, Output document As %XML.Document) as %Status
    Create a doocument by parsing the XML document contained in a stream.
    The parsed document is returned in document.
    A %Status is returned to indicate if parsing is successful.
    • method GetDocumentNode() as %String
    Returns the node id of the root element of this Document.
    • method GetNamespace(nsIndex As %Integer) as %String
    Return XML namespace URI for nsIndex into document's namespace table.
    • method GetNode(nodeId As %String) as %XML.Node
    Returns an %XML.Node DOM navigation object which is positioned at the the node specified by the nodeId argument.
    • method GetNodeById(id As %String)
    Return nodeId for node with id attribute = %id.
    • method GetVersion() as %Integer
    Return the version of the import handler that constructed this document. A programmatically constructed DOM will always have version "".
    • method InsertNamespace(namespace As %String)
    Return XML namespace URI for nsIndex into document's namespace table.
    • method SetNodeById(id As %String, nodeId As %Integer)
    Save nodeId for node with id attribute = %id.