Class: XML::DOM::Entity

Inherits:
Node
  • Object
show all
Defined in:
lib/xml/dom/core.rb,
lib/xml/dom2/entity.rb

Overview

Class XML::DOM::Entity

superclass

Node

Constant Summary

Constants inherited from Node

Node::ATTRIBUTE_NODE, Node::CDATA_SECTION_NODE, Node::COMMENT_NODE, Node::DOCUMENT_FRAGMENT_NODE, Node::DOCUMENT_NODE, Node::DOCUMENT_TYPE_NODE, Node::ELEMENT_NODE, Node::ENTITY_NODE, Node::ENTITY_REFERENCE_NODE, Node::NODE_NODE, Node::NOTATION_NODE, Node::PROCESSING_INSTRUCTION_NODE, Node::TEXT_NODE

Instance Method Summary collapse

Methods inherited from Node

#+, #<=>, #==, #[], #[]=, #__collectAncestorNS, #__collectDescendatNS, #__sibling, #_ancestor, #_child, #_descendant, #_following, #_fsibling, #_getChildIndex, #_getMyLocation, #_getMyLocationInXPath, #_getNodeByAbsoluteLocationTerm, #_insertNodes, #_matchAttribute?, #_matchNode?, #_matchNodeAttributes?, #_matchNodeType?, #_nodesByLocationTerms, #_nodesByRelativeLocationTerm, #_preceding, #_psibling, #_removeFromTree, #_removeNode, #_searchID, #accept, #accept_name, #appendChild, #attributes, #childNodes, #childNodes=, #children_accept, #children_accept_name, #dump, #each, #firstChild, #getDigest, #getNodesByXPath, #getNodesByXPointer, #hasAttributes, #hasChildNodes, #insertBefore, #inspect, #isSupported, #lastChild, #localname, #makeXPath, #makeXPointer, #namespaceURI, #nextSibling, #nodeValue, #nodeValue=, #ownerDocument, #ownerDocument=, #parentNode, #parentNode=, #prefix, #prefix=, #previousSibling, #removeChild, #replaceChild, #to_s, #trim

Constructor Details

#initialize(name, pubid, sysid, notation) ⇒ Entity

Class Methods

--- Entity.new(name, pubid, sysid, notation)

creates a new Entity.



2931
2932
2933
2934
2935
2936
2937
# File 'lib/xml/dom/core.rb', line 2931

def initialize(name, pubid, sysid, notation)
  super()
  @name = name.freeze
  @pubid = pubid.freeze
  @sysid = sysid.freeze
  @notation = notation.freeze
end

Instance Method Details

#_checkNode(node) ⇒ Object



3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
# File 'lib/xml/dom/core.rb', line 3001

def _checkNode(node)
  unless node.nodeType == ELEMENT_NODE ||
      node.nodeType == PROCESSING_INSTRUCTION_NODE ||
      node.nodeType == COMMENT_NODE ||
      node.nodeType == TEXT_NODE ||
      node.nodeType == CDATA_SECTION_NODE ||
      node.nodeType == ENTITY_REFERENCE_NODE
    raise DOMException.new(DOMException::HIERARCHY_REQUEST_ERR)
  end
end

#cloneNode(deep = true) ⇒ Object

DOM


2997
2998
2999
# File 'lib/xml/dom/core.rb', line 2997

def cloneNode(deep = true)
  super(deep, @name, @pubid, @sysid, @notation)
end

#nodeNameObject

DOM


2959
2960
2961
# File 'lib/xml/dom/core.rb', line 2959

def nodeName
  @name
end

#nodeTypeObject

DOM


2948
2949
2950
# File 'lib/xml/dom/core.rb', line 2948

def nodeType
  ENTITY_NODE
end

#notationNameObject

— Entity#notationName

returns the notationname of the Entity.



2986
2987
2988
# File 'lib/xml/dom/core.rb', line 2986

def notationName
  @notation
end

#publicIdObject

— Entity#publicId

returns the publicId of the Entity.



2968
2969
2970
# File 'lib/xml/dom/core.rb', line 2968

def publicId
  @pubid
end

#systemIdObject

— Entity#systemId

returns the systemId of the Entity.



2977
2978
2979
# File 'lib/xml/dom/core.rb', line 2977

def systemId
  @sysid
end