Keystrokes of GNU Readline
will timeout it with the specification of “keyseq-timeout” when waiting for the 2nd character after the 1st one. If the 2nd character comes after 1st ESC without timeout it has a meta-property of meta-key to discriminate modified key with meta-key from multibyte characters that come with 8th bit on.
GNU Readline
will wait for the 2nd character with “keyseq-timeout” milli-seconds but wait forever after 3rd characters.
Sets the previous sibling of this child. This can be used to insert a child before some other child.
a = Element.new("a") b = a.add_element("b") c = Element.new("c") b.previous_sibling = c # => <a><b/><c/></a>
According to the XML
spec, a root node has no expanded name
@return the XMLDecl
standalone value of this document as a String
. If no XMLDecl
has been set, returns the default setting.
Adds a namespace to this element.
the prefix string, or the namespace URI
if uri
is not supplied
the namespace URI
. May be nil, in which prefix
is used as the URI
Evaluates to: this Element
a = Element.new("a") a.add_namespace("xmlns:foo", "bar" ) a.add_namespace("foo", "bar") # shorthand for previous line a.add_namespace("twiddle") puts a #-> <a xmlns:foo='bar' xmlns='twiddle'/>
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/>