Class LibXML::XML::Node
In: ext/libxml/libxml.c
lib/libxml/node.rb
lib/libxml/node_set.rb
lib/libxml/properties.rb
Parent: Object

Methods

<<   ==   []   []=   attribute?   attribute_decl?   attributes   attributes?   base   base=   blank?   cdata?   child   child=   child?   child_add   children   children?   clone   comment?   content   content=   content_stripped   copy   debug_dump   doc   docbook_doc?   doctype?   document?   dtd?   dump   dup   each   each_child   each_element   element?   element_decl?   empty?   entity?   entity_ref?   eql?   find   find_first   first   first?   fragment?   html_doc?   lang   lang=   last   last?   line_num   name   name=   namespace   namespace=   namespace?   namespace_node   new   new_cdata   new_comment   new_text   next   next=   next?   node_type   node_type_name   notation?   ns   ns?   ns_def   ns_def?   parent   parent?   path   pi?   pointer   prev   prev=   prev?   properties   properties?   remove!   search_href   search_ns   sibling=   space_preserve   space_preserve=   text?   to_s   xinclude_end?   xinclude_start?   xlink?   xlink_type   xlink_type_name  

Included Modules

Enumerable

Classes and Modules

Class LibXML::XML::Node::FailedModify
Class LibXML::XML::Node::Set
Class LibXML::XML::Node::SetNamespace
Class LibXML::XML::Node::UnknownType

Constants

SPACE_DEFAULT = INT2NUM(0)
SPACE_PRESERVE = INT2NUM(1)
SPACE_NOT_INHERIT = INT2NUM(-1)
XLINK_ACTUATE_AUTO = INT2NUM(1)
XLINK_ACTUATE_NONE = INT2NUM(0)
XLINK_ACTUATE_ONREQUEST = INT2NUM(2)
XLINK_SHOW_EMBED = INT2NUM(2)
XLINK_SHOW_NEW = INT2NUM(1)
XLINK_SHOW_NONE = INT2NUM(0)
XLINK_SHOW_REPLACE = INT2NUM(3)
XLINK_TYPE_EXTENDED = INT2NUM(2)
XLINK_TYPE_EXTENDED_SET = INT2NUM(3)
XLINK_TYPE_NONE = INT2NUM(0)
XLINK_TYPE_SIMPLE = INT2NUM(1)
ELEMENT_NODE = INT2FIX(XML_ELEMENT_NODE)
ATTRIBUTE_NODE = INT2FIX(XML_ATTRIBUTE_NODE)
TEXT_NODE = INT2FIX(XML_TEXT_NODE)
CDATA_SECTION_NODE = INT2FIX(XML_CDATA_SECTION_NODE)
ENTITY_REF_NODE = INT2FIX(XML_ENTITY_REF_NODE)
ENTITY_NODE = INT2FIX(XML_ENTITY_NODE)
PI_NODE = INT2FIX(XML_PI_NODE)
COMMENT_NODE = INT2FIX(XML_COMMENT_NODE)
DOCUMENT_NODE = INT2FIX(XML_DOCUMENT_NODE)
DOCUMENT_TYPE_NODE = INT2FIX(XML_DOCUMENT_TYPE_NODE)
DOCUMENT_FRAG_NODE = INT2FIX(XML_DOCUMENT_FRAG_NODE)
NOTATION_NODE = INT2FIX(XML_NOTATION_NODE)
HTML_DOCUMENT_NODE = INT2FIX(XML_HTML_DOCUMENT_NODE)
DTD_NODE = INT2FIX(XML_DTD_NODE)
ELEMENT_DECL = INT2FIX(XML_ELEMENT_DECL)
ATTRIBUTE_DECL = INT2FIX(XML_ATTRIBUTE_DECL)
ENTITY_DECL = INT2FIX(XML_ENTITY_DECL)
NAMESPACE_DECL = INT2FIX(XML_NAMESPACE_DECL)
XINCLUDE_START = INT2FIX(XML_XINCLUDE_START)
XINCLUDE_END = INT2FIX(XML_XINCLUDE_END)
DOCB_DOCUMENT_NODE = INT2FIX(XML_DOCB_DOCUMENT_NODE)
DOCB_DOCUMENT_NODE = Qnil

Public Class methods

Create a new element node with the specified name, optionally setting the node’s content. backward compatibility for <.5 new

[Source]

/*
 * call-seq:
 *    XML::Node.new(name, content = nil) -> XML::Node
 *    XML::Node.new_element(name, content = nil) -> XML::Node
 * 
 * Create a new element node with the specified name, optionally setting
 * the node's content.
 * backward compatibility for <.5 new
 */
VALUE
ruby_xml_node2_new_string_bc(int argc, VALUE *argv, VALUE class)
{
  VALUE content=Qnil;
  VALUE name=Qnil;
  switch(argc) {
  case 2:
    content=argv[1];
    if ( TYPE(content) != T_STRING)
      content=rb_obj_as_string(content);
    
  case 1:
    name=check_string_or_symbol( argv[0] );
    return ruby_xml_node2_new_string(class,Qnil,name,content);

  default:
    rb_raise(rb_eArgError, "wrong number of arguments (1 or 2) given %d",argc);
  }
}

Create a new CDATA node, optionally setting the node’s content.

[Source]

/*
 * call-seq:
 *    XML::Node.new_cdata(content = nil) -> XML::Node
 * 
 * Create a new #CDATA node, optionally setting
 * the node's content.
 */
VALUE
ruby_xml_node_new_cdata(int argc, VALUE *argv, VALUE class) {

Create a new comment node, optionally setting the node’s content.

[Source]

/*
 * call-seq:
 *    XML::Node.new_comment(content = nil) -> XML::Node
 * 
 * Create a new comment node, optionally setting
 * the node's content.
 * 
 */
VALUE
ruby_xml_node_new_comment(int argc, VALUE *argv, VALUE class) {

Create a new text node, optionally setting the node’s content.

[Source]

/*
 * call-seq: 
 *    XML::Node.new_text(content = nil) -> XML::Node
 * 
 * Create a new text node, optionally setting
 * the node's content.
 * 
 */
VALUE
ruby_xml_node_new_text(VALUE class, VALUE text)
{
  VALUE obj;
  xmlNodePtr xnode;
  
  if ( NIL_P(text) )
    return Qnil;

  if (TYPE(text) != T_STRING )
    rb_raise(rb_eTypeError, "requires string argument");
  
  xnode=xmlNewText((xmlChar*)STR2CSTR(text));
  if ( xnode == NULL )
    return Qnil;
  
  obj=ruby_xml_node2_wrap(class,xnode);
  rb_obj_call_init(obj,0,NULL);
  return obj;
}

Public Instance methods

Add the specified string or XML::Node to this node’s content.

[Source]

/*
 * call-seq:
 *    node << ("string" | node) -> XML::Node
 * 
 * Add the specified string or XML::Node to this node's
 * content.
 */
VALUE
ruby_xml_node_content_add(VALUE self, VALUE obj) {

==(p1)

Alias for eql?

Obtain the named property.

[Source]

/*
 * call-seq:
 *    node.property("name") -> "string"
 *    node["name"]          -> "string"
 * 
 * Obtain the named property.
 */
VALUE
ruby_xml_node_property_get(VALUE self, VALUE name) {

Set the named property.

[Source]

/*
 * call-seq:
 *    node["name"] = "string"
 * 
 * Set the named property.
 */
VALUE
ruby_xml_node_property_set(VALUE self, VALUE name, VALUE value) {

Determine whether this is an attribute node,

[Source]

/*
 * call-seq:
 *    node.attribute? -> (true|false)
 * 
 * Determine whether this is an attribute node,
 */
VALUE
ruby_xml_node_attribute_q(VALUE self) {

Determine whether this is an attribute declaration node,

[Source]

/*
 * call-seq:
 *    node.attribute_decl? -> (true|false)
 * 
 * Determine whether this is an attribute declaration node,
 */
VALUE
ruby_xml_node_attribute_decl_q(VALUE self) {

Returns the XML::Attributes for this node.

[Source]

/*
 * call-seq:
 *    node.attributes -> attributes
 * 
 * Returns the XML::Attributes for this node. 
 */
VALUE
ruby_xml_node_attributes_get(VALUE self) {

Determine whether this node has properties (attributes).

[Source]

/*
 * call-seq:
 *    node.attributes? -> (true|false)
 * 
 * Determine whether this node has properties
 * (attributes).
 */
VALUE
ruby_xml_node_attributes_q(VALUE self) {

Obtain this node’s base URI.

[Source]

/*
 * call-seq:
 *    node.base -> "uri"
 * 
 * Obtain this node's base URI.
 */
VALUE
ruby_xml_node_base_get(VALUE self) {

Set this node’s base URI.

[Source]

/*
 * call-seq:
 *    node.base = "uri"
 * 
 * Set this node's base URI.
 */
VALUE
ruby_xml_node_base_set(VALUE self, VALUE uri) {

Determine whether this node is empty.

[Source]

/*
 * call-seq:
 *    node.empty? -> (true|false)
 * 
 * Determine whether this node is empty.
 */
VALUE
ruby_xml_node_empty_q(VALUE self) {

Determine whether this is a CDATA node

[Source]

/*
 * call-seq:
 *    node.cdata? -> (true|false)
 * 
 * Determine whether this is a #CDATA node
 */
VALUE
ruby_xml_node_cdata_q(VALUE self) {

child()

Alias for first

Set a child node for this node. Also called for <<

[Source]

/*
 * call-seq:
 *    node.child = node
 * 
 * Set a child node for this node. Also called for <<
 */
VALUE
ruby_xml_node_child_set(VALUE self, VALUE rnode) {

child?()

Alias for first?

Set a child node for this node.

[Source]

/*
 * call-seq:
 *    node.child_add(node)
 * 
 * Set a child node for this node.
 */
VALUE
ruby_xml_node_child_add(VALUE self, VALUE rnode) {

Returns this node’s children as an array.

[Source]

    # File lib/libxml/node.rb, line 49
49:       def children
50:         entries
51:       end
children?()

Alias for first?

[Source]

     # File lib/libxml/node.rb, line 122
122:       def clone
123:         copy(false)
124:       end

Determine whether this is a comment node

[Source]

/*
 * call-seq:
 *    node.comment? -> (true|false)
 * 
 * Determine whether this is a comment node
 */
VALUE
ruby_xml_node_comment_q(VALUE self) {

Obtain this node’s content as a string.

[Source]

/*
 * call-seq:
 *    node.content -> "string"
 * 
 * Obtain this node's content as a string.
 */
VALUE
ruby_xml_node_content_get(VALUE self) {

Set this node’s content to the specified string.

[Source]

/*
 * call-seq:
 *    node.content = "string"
 * 
 * Set this node's content to the specified string.
 */ 
VALUE
ruby_xml_node_content_set(VALUE self, VALUE content) {

Obtain this node’s stripped content.

Deprecated: Stripped content can be obtained via the content method.

[Source]

/*
 * call-seq:
 *    node.content_stripped -> "string"
 * 
 * Obtain this node's stripped content.
 * 
 * *Deprecated*: Stripped content can be obtained via the
 * +content+ method.
 */
VALUE
ruby_xml_node_content_stripped_get(VALUE self) {

Creates a copy of this node. To create a shallow copy set the deep parameter to false. To create a deep copy set the deep parameter to true.

[Source]

/*
 * call-seq:
 *    node.copy -> XML::Node
 * 
 * Creates a copy of this node.  To create a 
 * shallow copy set the deep parameter to false.
 * To create a deep copy set the deep parameter
 * to true. 
 *
 */
VALUE
ruby_xml_node_copy(VALUE self, VALUE deep) {

Dump this node to stdout, including any debugging information.

[Source]

/*
 * call-seq:
 *    node.debug_dump -> (true|nil)
 * 
 * Dump this node to stdout, including any debugging
 * information.
 */
VALUE
ruby_xml_node_debug_dump(VALUE self) {

Obtain the XML::Document this node belongs to.

[Source]

/*
 * call-seq:
 *    node.doc -> document
 * 
 * Obtain the XML::Document this node belongs to.
 */
VALUE
ruby_xml_node_doc(VALUE self) {

Determine whether this is a docbook node.

[Source]

/*
 * call-seq:
 *    node.docbook? -> (true|false)
 * 
 * Determine whether this is a docbook node.
 */
VALUE
ruby_xml_node_docbook_doc_q(VALUE self) {

Determine whether this is a DOCTYPE node.

[Source]

/*
 * call-seq:
 *    node.doctype? -> (true|false)
 * 
 * Determine whether this is a DOCTYPE node.
 */
VALUE
ruby_xml_node_doctype_q(VALUE self) {

Determine whether this is a document node.

[Source]

/*
 * call-seq:
 *    node.document? -> (true|false)
 * 
 * Determine whether this is a document node.
 */
VALUE
ruby_xml_node_document_q(VALUE self) {

Determine whether this is a DTD node.

[Source]

/*
 * call-seq:
 *    node.dtd? -> (true|false)
 * 
 * Determine whether this is a DTD node.
 */
VALUE
ruby_xml_node_dtd_q(VALUE self) {

Dump this node to stdout.

[Source]

/*
 * call-seq:
 *    node.dump -> (true|nil)
 * 
 * Dump this node to stdout.
 */
VALUE
ruby_xml_node_dump(VALUE self) {

[Source]

     # File lib/libxml/node.rb, line 118
118:       def dup
119:         copy(false)
120:       end

Iterates over all of this node’s children, including text nodes, element nodes, etc. If you wish to iterate only over child elements, use XML::Node#each_element.

 doc = XML::Document.new('model/books.xml')
 doc.root.each {|node| puts node}

[Source]

/*
 * call-seq:
 *    node.each -> XML::Node
 * 
 * Iterates over all of this node's children, including text 
 * nodes, element nodes, etc.  If you wish to iterate
 * only over child elements, use XML::Node#each_element.
 *
 *  doc = XML::Document.new('model/books.xml')
 *  doc.root.each {|node| puts node}
 */
VALUE
ruby_xml_node_each(VALUE self) {

each_child()

Alias for each

[Source]

    # File lib/libxml/node.rb, line 32
32:       def each_element
33:         each do |node|
34:           yield(node) if node.node_type == ELEMENT_NODE
35:         end
36:       end

Determine whether this is an element node.

[Source]

/*
 * call-seq:
 *    node.element? -> (true|false)
 * 
 * Determine whether this is an element node.
 */
VALUE
ruby_xml_node_element_q(VALUE self) {

Determine whether this is an element declaration node.

[Source]

/*
 * call-seq:
 *    node.element_decl? -> (true|false)
 * 
 * Determine whether this is an element declaration node.
 */
VALUE
ruby_xml_node_element_decl_q(VALUE self) {

Determine whether this node is empty.

[Source]

/*
 * call-seq:
 *    node.empty? -> (true|false)
 * 
 * Determine whether this node is empty.
 */
VALUE
ruby_xml_node_empty_q(VALUE self) {

Determine whether this is an entity node.

[Source]

/*
 * call-seq:
 *    node.entity? -> (true|false)
 * 
 * Determine whether this is an entity node.
 */
VALUE
ruby_xml_node_entity_q(VALUE self) {

Determine whether this is an entity reference node.

[Source]

/*
 * call-seq:
 *    node.entity_ref? -> (true|false)
 * 
 * Determine whether this is an entity reference node.
 */
VALUE
ruby_xml_node_entity_ref_q(VALUE self) {

Test equality between the two nodes. Two nodes are equal if they are the same node or have the same XML representation.

[Source]

/*
 * call-seq:
 *    node.eql?(other_node) => (true|false)
 * 
 * Test equality between the two nodes. Two nodes are equal
 * if they are the same node or have the same XML representation.*/
VALUE
ruby_xml_node_eql_q(VALUE self, VALUE other) {

Return nodes matching the specified xpath expression. For more information, please refer to the documentation for XML::Document#find.

[Source]

    # File lib/libxml/node.rb, line 10
10:       def find(xpath, nslist = nil)
11:         if not self.doc
12:           raise(TypeError, "A node must belong to a document before " +
13:                            "it can be searched with XPath.")
14:         end
15:       
16:         context = XPath::Context.new(self)
17:         context.node = self  
18:         context.register_namespaces_from_node(self)
19:         context.register_namespaces_from_node(self.doc.root)
20:         context.register_namespaces(nslist) if nslist
21: 
22:         context.find(xpath)
23:       end

Return the first node matching the specified xpath expression. For more information, please refer to the documentation for XML::Node#find.

[Source]

    # File lib/libxml/node.rb, line 28
28:       def find_first(xpath, nslist = nil)
29:         find(xpath, nslist).first
30:       end

Returns this node’s first child node if any.

[Source]

/*
 * call-seq:
 *    node.first -> XML::Node
 * 
 * Returns this node's first child node if any.
 */
VALUE
ruby_xml_node_first_get(VALUE self) {

Determines whether this node has a first node

[Source]

    # File lib/libxml/node.rb, line 44
44:       def first?
45:         not first.nil?
46:       end

Determine whether this node is a fragment.

[Source]

/*
 * call-seq:
 *    node.fragment? -> (true|false)
 * 
 * Determine whether this node is a fragment.
 */
VALUE
ruby_xml_node_fragment_q(VALUE self) {

Determine whether this node is an html document node.

[Source]

/*
 * call-seq:
 *    node.html_doc? -> (true|false)
 * 
 * Determine whether this node is an html document node.
 */
VALUE
ruby_xml_node_html_doc_q(VALUE self) {

Obtain the language set for this node, if any. This is set in XML via the xml:lang attribute.

[Source]

/*
 * call-seq:
 *    node.lang -> "string"
 * 
 * Obtain the language set for this node, if any.
 * This is set in XML via the xml:lang attribute.
 */
VALUE
ruby_xml_node_lang_get(VALUE self) {

Set the language for this node. This affects the value of the xml:lang attribute.

[Source]

/*
 * call-seq:
 *    node.lang = "string"
 * 
 * Set the language for this node. This affects the value
 * of the xml:lang attribute.
 */
VALUE
ruby_xml_node_lang_set(VALUE self, VALUE lang) {

Obtain the last child node of this node, if any.

[Source]

/*
 * call-seq:
 *    node.last -> XML::Node
 * 
 * Obtain the last child node of this node, if any.
 */
VALUE
ruby_xml_node_last_get(VALUE self) {

Determines whether this node has a last node

[Source]

    # File lib/libxml/node.rb, line 64
64:       def last?
65:         not last.nil?
66:       end

Obtain the line number (in the XML document) that this node was read from. If default_line_numbers is set false (the default), this method returns zero.

[Source]

/*
 * call-seq:
 *    node.line_num -> num
 * 
 * Obtain the line number (in the XML document) that this
 * node was read from. If +default_line_numbers+ is set
 * false (the default), this method returns zero.
 */
VALUE
ruby_xml_node_line_num(VALUE self) {

Obtain this node’s name.

[Source]

/*
 * call-seq:
 *    node.name -> "string"
 * 
 * Obtain this node's name.
 */
VALUE
ruby_xml_node_name_get(VALUE self) {

Set this node’s name.

[Source]

/*
 * call-seq:
 *    node.name = "string"
 * 
 * Set this node's name.
 */
VALUE
ruby_xml_node_name_set(VALUE self, VALUE name) {

Obtain an array of +XML::NS+ objects representing this node’s xmlns attributes

[Source]

/*
 * call-seq:
 *    node.namespace -> [namespace, ..., namespace]
 * 
 * Obtain an array of +XML::NS+ objects representing
 * this node's xmlns attributes
 */
VALUE
ruby_xml_node_namespace_get(VALUE self) {

Add the specified XML::NS object to this node’s xmlns attributes.

[Source]

/*
 * call-seq:
 *    node.namespace = namespace
 * 
 * Add the specified XML::NS object to this node's xmlns attributes.
 */
VALUE
ruby_xml_node_namespace_set(int argc, VALUE *argv, VALUE self) {

Determine whether this node is (not has) a namespace node.

[Source]

/*
 * call-seq:
 *    node.namespace? -> (true|false)
 * 
 * Determine whether this node *is* (not has) a namespace
 * node.
 */
VALUE
ruby_xml_node_namespace_q(VALUE self) {

Obtain this node’s namespace node.

[Source]

/*
 * call-seq:
 *    node.namespace_node -> namespace.
 * 
 * Obtain this node's namespace node.
 */
VALUE
ruby_xml_node_namespace_get_node(VALUE self) {

Obtain the next sibling node, if any.

[Source]

/*
 * call-seq:
 *    node.next -> XML::Node
 * 
 * Obtain the next sibling node, if any.
 */
VALUE
ruby_xml_node_next_get(VALUE self) {

Insert the specified node as this node’s next sibling.

[Source]

/*
 * call-seq:
 *    node.next = node
 * 
 * Insert the specified node as this node's next sibling.
 */
VALUE
ruby_xml_node_next_set(VALUE self, VALUE rnode) {

Determines whether this node has a next node

[Source]

    # File lib/libxml/node.rb, line 54
54:       def next?
55:         not self.next.nil?
56:       end

Obtain this node’s type identifier.

[Source]

/*
 * call-seq:
 *    node.type -> num
 * 
 * Obtain this node's type identifier.
 */
VALUE
ruby_xml_node_type(VALUE self) {

Returns this node’s type name

[Source]

     # File lib/libxml/node.rb, line 69
 69:       def node_type_name
 70:         case node_type
 71:           when ELEMENT_NODE:
 72:             'element'
 73:           when ATTRIBUTE_NODE:
 74:             'attribute'
 75:           when TEXT_NODE:
 76:             'text'
 77:           when CDATA_SECTION_NODE:
 78:             'cdata'
 79:           when ENTITY_REF_NODE:
 80:             'entity_ref'
 81:           when ENTITY_NODE:
 82:             'entity'
 83:           when PI_NODE:
 84:             'pi'
 85:           when COMMENT_NODE:
 86:             'comment'
 87:           when DOCUMENT_NODE:
 88:             'document_xml'
 89:           when DOCUMENT_TYPE_NODE:
 90:             'doctype'
 91:           when DOCUMENT_FRAG_NODE:
 92:             'fragment'
 93:           when NOTATION_NODE:
 94:             'notation'
 95:           when HTML_DOCUMENT_NODE:
 96:             'document_html'
 97:           when DTD_NODE:
 98:             'dtd'
 99:           when ELEMENT_DECL:
100:             'elem_decl'
101:           when ATTRIBUTE_DECL:
102:             'attribute_decl'
103:           when ENTITY_DECL:
104:             'entity_decl'
105:           when NAMESPACE_DECL:
106:             'namespace'
107:           when XINCLUDE_START:
108:             'xinclude_start'
109:           when XINCLUDE_END:
110:             'xinclude_end'
111:           when DOCB_DOCUMENT_NODE:
112:             'document_docbook'
113:           else
114:             raise(UnknownType, "Unknown node type: %n", node.node_type);
115:         end
116:       end

Determine whether this is a notation node

[Source]

/*
 * call-seq:
 *    node.notation? -> (true|false)
 * 
 * Determine whether this is a notation node
 */
VALUE
ruby_xml_node_notation_q(VALUE self) {

Obtain an array of +XML::NS+ objects representing this node’s xmlns attributes

[Source]

/*
 * call-seq:
 *    node.namespace -> [namespace, ..., namespace]
 * 
 * Obtain an array of +XML::NS+ objects representing
 * this node's xmlns attributes
 */
VALUE
ruby_xml_node_namespace_get(VALUE self) {

Determine whether this node is a namespace node.

[Source]

/*
 * call-seq:
 *    node.ns? -> (true|false)
 * 
 * Determine whether this node is a namespace node.
 */
VALUE
ruby_xml_node_ns_q(VALUE self) {

Obtain this node’s default namespace.

[Source]

/*
 * call-seq:
 *    node.ns_def -> namespace
 * 
 * Obtain this node's default namespace.
 */
VALUE
ruby_xml_node_ns_def_get(VALUE self) {

Obtain an array of +XML::NS+ objects representing this node’s xmlns attributes

[Source]

/*
 * call-seq:
 *    node.ns_def? -> (true|false)
 * 
 * Obtain an array of +XML::NS+ objects representing
 * this node's xmlns attributes
 */
VALUE
ruby_xml_node_ns_def_q(VALUE self) {

Obtain this node’s parent node, if any.

[Source]

/*
 * call-seq:
 *    node.parent -> XML::Node
 * 
 * Obtain this node's parent node, if any.
 */
VALUE
ruby_xml_node_parent_get(VALUE self) {

Determines whether this node has a parent node

[Source]

    # File lib/libxml/node.rb, line 39
39:       def parent?
40:         not parent.nil?
41:       end

Obtain this node’s path.

[Source]

/*
 * call-seq:
 *    node.path -> path
 * 
 * Obtain this node's path.
 */
VALUE
ruby_xml_node_path(VALUE self) {

Determine whether this is a processing instruction node.

[Source]

/*
 * call-seq:
 *    node.pi? -> (true|false)
 * 
 * Determine whether this is a processing instruction node.
 */
VALUE
ruby_xml_node_pi_q(VALUE self) {

Evaluates an XPointer expression relative to this node.

[Source]

/*
 * call-seq:
 *    node.pointer -> XML::Node_set
 * 
 * Evaluates an XPointer expression relative to this node.
 */
VALUE
ruby_xml_node_pointer(VALUE self, VALUE xptr_str) {

Obtain the previous sibling, if any.

[Source]

/*
 * call-seq:
 *    node.prev -> XML::Node
 * 
 * Obtain the previous sibling, if any.
 */
VALUE
ruby_xml_node_prev_get(VALUE self) {

Insert the specified node as this node’s previous sibling.

[Source]

/*
 * call-seq:
 *    node.prev = node
 * 
 * Insert the specified node as this node's previous sibling.
 */
VALUE
ruby_xml_node_prev_set(VALUE self, VALUE rnode) {

Determines whether this node has a previous node

[Source]

    # File lib/libxml/node.rb, line 59
59:       def prev?
60:         not prev.nil?
61:       end

[Source]

    # File lib/libxml/properties.rb, line 9
 9:       def properties
10:         attributes
11:       end
properties?()

Alias for attributes?

Removes this node from it’s parent.

[Source]

/*
 * call-seq:
*    node.remove! -> nil
*
* Removes this node from it's parent.
*/
VALUE
ruby_xml_node_remove_ex(VALUE self) {

Search for a namespace by href.

[Source]

/*
 * call-seq:
 *    node.search_href -> namespace
 * 
 * Search for a namespace by href.
 */
VALUE
ruby_xml_node_search_href(VALUE self, VALUE href) {

Search for a namespace by namespace.

[Source]

/*
 * call-seq:
 *    node.search_ns -> namespace
 * 
 * Search for a namespace by namespace.
 */
VALUE
ruby_xml_node_search_ns(VALUE self, VALUE ns) {

Add the specified node as a sibling of this node.

[Source]

/*
 * call-seq:
 *    node.sibling(node) -> XML::Node
 * 
 * Add the specified node as a sibling of this node.
 */
VALUE
ruby_xml_node_sibling_set(VALUE self, VALUE rnode) {

Determine whether this node preserves whitespace.

[Source]

/*
 * call-seq:
 *    node.space_preserve -> (true|false)
 * 
 * Determine whether this node preserves whitespace.
 */
VALUE
ruby_xml_node_space_preserve_get(VALUE self) {

Control whether this node preserves whitespace.

[Source]

/*
 * call-seq:
 *    node.space_preserve = true|false
 * 
 * Control whether this node preserves whitespace.
 */
VALUE
ruby_xml_node_space_preserve_set(VALUE self, VALUE bool) {

Determine whether this node has text.

[Source]

/*
 * call-seq:
 *    node.text? -> (true|false)
 * 
 * Determine whether this node has text.
 */
VALUE
ruby_xml_node_text_q(VALUE self) {

Coerce this node to a string representation of it’s XML.

[Source]

/*
 * call-seq:
 *    node.to_s -> "string"
 * 
 * Coerce this node to a string representation of
 * it's XML.
 */
VALUE
ruby_xml_node_to_s(VALUE self) {

Determine whether this node is an xinclude end node.

[Source]

/*
 * call-seq:
 *    node.xinclude_end? -> num
 * 
 * Determine whether this node is an xinclude end node.
 */
VALUE
ruby_xml_node_xinclude_end_q(VALUE self) {

Determine whether this node is an xinclude start node.

[Source]

/*
 * call-seq:
 *    node.xinclude_start? -> num
 * 
 * Determine whether this node is an xinclude start node.
 */
VALUE
ruby_xml_node_xinclude_start_q(VALUE self) {

Determine whether this node is an xlink node.

[Source]

/*
 * call-seq:
 *    node.xlink? -> (true|false)
 * 
 * Determine whether this node is an xlink node.
 */
VALUE
ruby_xml_node_xlink_q(VALUE self) {

Obtain the type identifier for this xlink, if applicable. If this is not an xlink node (see +xlink?+), will return nil.

[Source]

/*
 * call-seq:
 *    node.xlink_type -> num
 * 
 * Obtain the type identifier for this xlink, if applicable.
 * If this is not an xlink node (see +xlink?+), will return
 * nil.
 */
VALUE
ruby_xml_node_xlink_type(VALUE self) {

Obtain the type name for this xlink, if applicable. If this is not an xlink node (see +xlink?+), will return nil.

[Source]

/*
 * call-seq:
 *    node.xlink_type_name -> "string"
 * 
 * Obtain the type name for this xlink, if applicable.
 * If this is not an xlink node (see +xlink?+), will return
 * nil.
 */
VALUE
ruby_xml_node_xlink_type_name(VALUE self) {

[Validate]