LibXML::XML::

Node

class
Superclass
Object

Public Instance Methods

anchor
inspect()
# File lib/libxml/monkeypatches.rb, line 27
def inspect
        return "#<%p:%#016x %s:%s %p (%s)>" % [
                self.class,
                self.object_id * 2,
                self.node_type_name,
                self.name,
                self.attributes.to_h,
                self.path,
        ]
end
anchor
node_type_name()
# File lib/libxml/monkeypatches.rb, line 38
def node_type_name
        return case self.node_type
                when ELEMENT_NODE
                        "element"
                when ATTRIBUTE_NODE
                        "attribute"
                when TEXT_NODE
                        "text"
                when CDATA_SECTION_NODE
                        "cdata section"
                when ENTITY_REF_NODE
                        "entity ref"
                when ENTITY_NODE
                        "entity"
                when PI_NODE
                        "pi"
                when COMMENT_NODE
                        "comment"
                when DOCUMENT_NODE
                        "document"
                when DOCUMENT_TYPE_NODE
                        "document type"
                when DOCUMENT_FRAG_NODE
                        "document frag"
                when NOTATION_NODE
                        "notation"
                when HTML_DOCUMENT_NODE
                        "html document"
                when DTD_NODE
                        "dtd"
                when ELEMENT_DECL
                        "element decl"
                when ATTRIBUTE_DECL
                        "attribute decl"
                when ENTITY_DECL
                        "entity decl"
                when NAMESPACE_DECL
                        "namespace decl"
                when XINCLUDE_START
                        "xinclude start"
                when XINCLUDE_END
                        "xinclude end"
                when DOCB_DOCUMENT_NODE
                        "docb document"
                else
                        nil
                end
end