%XML.Document
class %XML.Document extends %XML.ImportHandler, %XML.Node
For details on using this class, see Representing an XML Document as a DOM.
%XML.Document represents an XML document as an Document Object Model (DOM). The DOM may be created eitherThe %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.
Method Inventory
- CountNamespace()
- CreateDocument()
- FindNamespace()
- GetDocumentElement()
- GetDocumentFromStream()
- GetDocumentNode()
- GetNamespace()
- GetNode()
- GetNodeById()
- GetVersion()
- InsertNamespace()
- SetNodeById()
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.
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.
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.
Return XML namespace URI for nsIndex into document's namespace table.
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.
Save nodeId for node with id attribute = %id.
Inherited Members
Inherited Properties
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %ValidateObject()
- AddIDs()
- AppendCharacter()
- AppendElement()
- AppendNode()
- AppendTree()
- AttributeDefined()
- CopyDocument()
- FirstAttributeName()
- GetAttribute()
- GetAttributeNS()
- GetAttributeNamespace()
- GetAttributeQName()
- GetAttributeQNameNS()
- GetAttributeValue()
- GetAttributeValueNS()
- GetAttributeValueNamespace()
- GetAttributeValueNamespaceNS()
- GetNextId()
- GetNumberAttributes()
- GetText()
- HasChildNodes()
- InsertCharacter()
- InsertElement()
- InsertNode()
- InsertTree()
- IsDescendant()
- KillDocument()
- LastAttributeName()
- LocatePosition()
- Mask()
- MoveToFirstChild()
- MoveToLastChild()
- MoveToNextSibling()
- MoveToParent()
- MoveToParentElement()
- MoveToPreviousSibling()
- NextAttributeName()
- PopHandler()
- PreviousAttributeName()
- PushHandler()
- Remove()
- RemoveAttribute()
- RemoveAttributeNS()
- ReplaceCharacter()
- ReplaceElement()
- ReplaceNode()
- ReplaceTree()
- Serialize()
- SerializeAttribute()
- SerializeBase64Attribute()
- SerializeBase64Node()
- SerializeNode()
- SetAttribute()
- comment()
- endCDATA()
- endDTD()
- endEntity()
- ignorableWhitespace()
- processingInstruction()
- skippedEntity()
- startCDATA()
- startDTD()
- startEntity()