Sha256: 7adf52ffb9b5f3c680f271da01564f2e9978b285206eb103526909fec7c3cf54
Contents?: true
Size: 1.55 KB
Versions: 3
Compression:
Stored size: 1.55 KB
Contents
## -*- Ruby -*- ## XML::DOM ## 1998-2001 by yoshidam ## require 'xml/dom2/node' module XML module DOM =begin == Class XML::DOM::DocumentType === superclass Node =end class DocumentType<Node =begin === Class Methods --- DocumentType.new(name, pubid, sysid, *children) creates a new DocuemntType. =end def initialize(name, pubid, sysid, *children) super(*children) raise "parameter error" if !name @name = name.freeze @pubid = pubid.freeze @sysid = sysid.freeze end =begin === Methods --- DocumentType#nodeType [DOM] returns the nodeType. =end ## [DOM] def nodeType DOCUMENT_TYPE_NODE end =begin --- DocumentType#nodeName [DOM] returns the nodeName. =end ## [DOM] def nodeName @name end =begin --- DocumentType#to_s returns the string representation of the DocumentType. =end def to_s "" end =begin --- DocumentType#dump(depth = 0) dumps the DocumentType. =end def dump(depth = 0) print ' ' * depth * 2 print "<!DOCTYPE #{@name}>\n" end =begin --- DocumentType#cloneNode(deep = true) [DOM] returns the copy of the DocumentType. =end ## [DOM] def cloneNode(deep = true) super(deep, @name, @pubid, @sysid) end ## [DOM] ## def entities; @entities; end ## def notations; @notations; end ## [DOM2] def publicId; @pubid; end ## [DOM2] def systemId; @sysid; end ## [DOM2] def internalSubset; end end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
mame-xmlparser-0.6.81.1 | lib/xml/dom2/documenttype.rb |
xmlparser-0.7.2.1 | lib/xml/dom2/documenttype.rb |
xmlparser-0.6.81 | lib/xml/dom2/documenttype.rb |