Class Document

XML DOM Document Interface.

See the Document and Node interfaces.

Tables

Document.properties Properties of the Document class, beyond the Node class

Methods

Document:adoptNode (source) Not implemented.
Document:createAttribute (name) Creates a plain Attribute node, implements createAttribute.
Document:createAttributeNS (namespaceURI, qualifiedName) Creates a namespaced Attribute node, implements createAttributeNS.
Document:createCDATASection (data) Creates a CDATASection node, implements createCDATASection.
Document:createComment (data) Creates a Comment node, implements createComment.
Document:createDocumentFragment () Creates a DocumentFragment node, implements createDocumentFragment.
Document:createElement (tagName) Creates a Element node, implements createElement.
Document:createElementNS (namespaceURI, qualifiedName) Creates a namespaced Element node, implements createElementNS.
Document:createEntityReference (name) Not implemeneted.
Document:createProcessingInstruction (target, data) Creates a ProcessingInstruction node, implements createProcessingInstruction.
Document:createTextNode (data) Creates a Text node, implements createTextNode.
Document:getElementById (elementId) Not implemented.
Document:getElementsByTagName (name) Returns a list of children matching the name, implements getElementsByTagName.
Document:getElementsByTagNameNS (namespaceURI, localName) Returns a list of children matching the namespace, implements getElementsByTagNameNS.
Document:importNode (importedNode, deep) Not implemented.
Document:normalizeDocument (source) Not implemented.
Document:renameNode (n, namespaceURI, qualifiedName) Not implemented.
Document:write ([buffer[, namespacesInScope]]) exports the XML.


Tables

Document.properties
Properties of the Document class, beyond the Node class

Fields:

Methods

Document:adoptNode (source)
Not implemented. Adopts a node (DOM 3 method) into the current document, implements adoptNode.

Parameters:

Returns:

    the adopted Node or nil+err
Document:createAttribute (name)
Creates a plain Attribute node, implements createAttribute.

Parameters:

Returns:

    new Attribute node
Document:createAttributeNS (namespaceURI, qualifiedName)
Creates a namespaced Attribute node, implements createAttributeNS.

Parameters:

  • namespaceURI string the namespaceURI for the Attribute.
  • qualifiedName string the qualified attribute name.

Returns:

    new Attribute node
Document:createCDATASection (data)
Creates a CDATASection node, implements createCDATASection.

Parameters:

  • data string the CData contents.

Returns:

    new CDATASection node
Document:createComment (data)
Creates a Comment node, implements createComment.

Parameters:

Returns:

    new Comment node
Document:createDocumentFragment ()
Creates a DocumentFragment node, implements createDocumentFragment.

Returns:

    new DocumentFragment node
Document:createElement (tagName)
Creates a Element node, implements createElement.

Parameters:

Returns:

    new Element node
Document:createElementNS (namespaceURI, qualifiedName)
Creates a namespaced Element node, implements createElementNS.

Parameters:

  • namespaceURI string the namespaceURI for the Element.
  • qualifiedName string the qualified element name.

Returns:

    new Element node
Document:createEntityReference (name)
Not implemeneted. Creates a EntityReference node, implements createEntityReference.

Parameters:

  • name string the entity reference name.

Returns:

    new EntityReference node
Document:createProcessingInstruction (target, data)
Creates a ProcessingInstruction node, implements createProcessingInstruction.

Parameters:

  • target string the target for the instruction.
  • data string the instruction.

Returns:

    new ProcessingInstruction node
Document:createTextNode (data)
Creates a Text node, implements createTextNode.

Parameters:

Returns:

    new Text node
Document:getElementById (elementId)
Not implemented. Returns a child matching the name, implements getElementById.

Parameters:

  • elementId string the id value to search for.

Returns:

    the matching Element node
Document:getElementsByTagName (name)
Returns a list of children matching the name, implements getElementsByTagName. The search is done recursively over the full depth, in a preorder traversal, and this will be the order of the elements in the returned NodeList.

Parameters:

  • name string Element tag name to search for, or "*" to match all.

Returns:

    NodeList with children with the requested name.
Document:getElementsByTagNameNS (namespaceURI, localName)
Returns a list of children matching the namespace, implements getElementsByTagNameNS. The search is done recursively over the full depth, in a preorder traversal, and this will be the order of the elements in the returned NodeList.

Parameters:

  • namespaceURI string Element namespace URI to search for, or "*" to match all.
  • localName string Element localname to search for, or "*" to match all.

Returns:

    NodeList with children with the requested namespace.
Document:importNode (importedNode, deep)
Not implemented. Clones and imports the node, implements importNode.

Parameters:

  • importedNode Node the Node to import from another Document.
  • deep bool if true create a recursive copy.

Returns:

    the newly cloned and imported Node, or nil+err
Document:normalizeDocument (source)
Not implemented. Normalizes the document (DOM 3 method), implements normalizeDocument.

Parameters:

Returns:

    the normalized Document or nil+err
Document:renameNode (n, namespaceURI, qualifiedName)
Not implemented. Rename a node (DOM 3 method), implements importNode.

Parameters:

  • n Attr or Element the Attr or Element node to rename.
  • namespaceURI string the new namespaceUri.
  • qualifiedName string the new name.

Returns:

    the updated Node or nil+err
Document:write ([buffer[, namespacesInScope]])
exports the XML.

Parameters:

  • buffer array an array to which the chunks can be added. (optional)
  • namespacesInScope table namespaceURIs indexed by prefix. For any namespace not in this table, the definitions will be generated. (optional)

Returns:

    the buffer array
generated by LDoc 1.4.6 Last updated 2022-04-22 13:38:32