Removes a namespace from this node. This only works if the namespace is actually declared in this node. If no argument is passed, deletes the default namespace.
Evaluates to: this element
doc = Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>" doc.root.delete_namespace puts doc # -> <a xmlns:foo='bar'/> doc.root.delete_namespace 'foo' puts doc # -> <a/>
Returns the previous sibling that is an element, or nil if there is no Element
sibling prior to this one
doc = Document.new '<a><b/>text<c/></a>' doc.root.elements['c'].previous_element #-> <b/> doc.root.elements['b'].previous_element #-> nil
Inserts an child before another child @param child1 this is either an xpath or an Element
. If an Element
, child2 will be inserted before child1 in the child list of the parent. If an xpath, child2 will be inserted before the first child to match the xpath. @param child2 the child to insert @return the parent (self)
Inserts an child after another child @param child1 this is either an xpath or an Element
. If an Element
, child2 will be inserted after child1 in the child list of the parent. If an xpath, child2 will be inserted after the first child to match the xpath. @param child2 the child to insert @return the parent (self)
Deeply clones this object. This creates a complete duplicate of this Parent
, including all descendants.
Returns a String namespace for a node, given a prefix The rules are:
1. Use the supplied namespace mapping first. 2. If no mapping was supplied, use the context node to look up the namespace
Creates threads that pick up UDP packets and passes them to do_write
for decoding.
Extracts the response URI
from msg
and adds it to TupleSpace
where it will be picked up by reply_service
for notification.
Full path of the target library file. If the file is not in this gem, return nil.
Paths in the gem to add to $LOAD_PATH
when this gem is activated.
See also require_paths=
If you have an extension you do not need to add "ext"
to the require path, the extension build process will copy the extension files into “lib” for you.
The default value is "lib"
Usage:
# If all library files are in the root directory... spec.require_path = '.'
Returns the paths to the source files for use with analysis and documentation tools. These paths are relative to full_gem_path.
Arguments used when building gems