Class DOMImplementation
XML DOM DOMImplementation class.
See the DOMImplementation interface
Functions
methods:createDocument (namespaceURI, qualifiedName[, doctype]) | Creates a new Document instance, implements createDocument. |
methods:createDocumentType (qualifiedName, publicId, systemId) | Creates a new DocumentType instance, implements createDocumentType. |
methods:hasFeature (feature, version) | Not implemented. |
Functions
- methods:createDocument (namespaceURI, qualifiedName[, doctype])
-
Creates a new Document instance, implements createDocument.
Parameters:
- namespaceURI
string or nil
(required if the
qualifiedName
has a prefix) - qualifiedName
string
the
tagName
of the top element, can have a prefix. - doctype DocumentType a DocumentType instance. (optional)
Returns:
-
a new Document instance
Usage:
local DOM = require("expadom.DOMImplementation")() -- create an instance local doc1 = DOM:createDocument(nil, "root") -- plain root element local doc2 = DOM:createDocument("http://namespace", "prefix:root") -- namespaced root element local doc3 = DOM:createDocument("http://namespace", "root") -- root element with default namespace
- namespaceURI
string or nil
(required if the
- methods:createDocumentType (qualifiedName, publicId, systemId)
-
Creates a new DocumentType instance, implements createDocumentType.
Parameters:
- qualifiedName string the DocumentType name
- publicId string the public id
- systemId string the system id
Returns:
-
a new DocumentType instance
- methods:hasFeature (feature, version)
-
Not implemented.
Parameters:
- feature TODO
- version implement hasFeature