class XML::DOM::DOMImplementation
Class XML::DOM::DOMImplementation
¶ ↑
Class XML::DOM::DOMImplementation
¶ ↑
Public Instance Methods
createDOMBuilder()
click to toggle source
- DOM3?
# File lib/xml/dom2/domimplementation.rb, line 55 def createDOMBuilder XML::DOM::DOMBuilder.new(Document.new) end
createDocument(nsuri, qname, doctype)
click to toggle source
- DOM2
# File lib/xml/dom2/domimplementation.rb, line 40 def createDocument(nsuri, qname, doctype) raise DOMException.new(DOMException::WRONG_DOCUMENT_ERR) if doctype && doctype.ownerDocument doc = Document.new if doctype doc.appendChild(doctype) doctype.ownerDocument = doc end elem = doc.createElementNS(nsuri, qname) doc.appendChild(elem) doc.implementation = self doc end
createDocumentType(qname, pubid, sysid)
click to toggle source
- DOM2
# File lib/xml/dom2/domimplementation.rb, line 35 def createDocumentType(qname, pubid, sysid) DocumentType.new(qname, pubid, sysid) end
hasFeature(feature, version)
click to toggle source
# File lib/xml/dom/core.rb, line 166 def hasFeature(feature, version) if feature =~ /^XML$/i && (version.nil? || version == "1.0") return true end false end