Retrieves a weakly referenced object with the given key
Retrieve the session data for key key
.
In the default mixed mode, this method returns rows for index access and columns for header access. You can force the index association by first calling by_col
!() or by_row
!().
Columns are returned as an Array of values. Altering that Array has no effect on the table.
Retrieves key
from the GW
Access the attlist attribute/value pairs.
value = attlist_decl[ attribute_name ]
Fetches an attribute value or a child.
If String or Symbol
is specified, it’s treated as attribute name. Attribute
value as String or nil
is returned. This case is shortcut of attributes[name]
.
If Integer
is specified, it’s treated as the index of child. It returns Nth child.
doc = REXML::Document.new("<a attr='1'><b/><c/></a>") doc.root["attr"] # => "1" doc.root.attributes["attr"] # => "1" doc.root[1] # => <c/>
Fetches a child element. Filters only Element
children, regardless of the XPath
match.
the search parameter. This is either an Integer
, which will be used to find the index’th child Element
, or an XPath
, which will be used to search for the Element
. Because of the nature of XPath searches, any element in the connected XML document can be fetched through any other element. The Integer index is 1-based, not 0-based. This means that the first child element is at index 1, not 0, and the +n+th element is at index n
, not n-1
. This is because XPath
indexes element children starting from 1, not 0, and the indexes should be the same.
optional, and only used in the first argument is an Integer
. In that case, the index’th child Element
that has the supplied name will be returned. Note again that the indexes start at 1.
the first matching Element
, or nil if no child matched
doc = Document.new '<a><b/><c id="1"/><c id="2"/><d/></a>' doc.root.elements[1] #-> <b/> doc.root.elements['c'] #-> <c id="1"/> doc.root.elements[2,'c'] #-> <c id="2"/>
Fetches an attribute value. If you want to get the Attribute
itself, use get_attribute
()
an XPath
attribute name. Namespaces are relevant here.
the String value of the matching attribute, or nil
if no matching attribute was found. This is the unnormalized value (with entities expanded).
doc = Document.new "<a foo:att='1' bar:att='2' att='<'/>" doc.root.attributes['att'] #-> '<' doc.root.attributes['bar:att'] #-> '2'
Fetches a child at a given index @param index the Integer
index of the child to fetch
Accessor method for elements of the tuple.
Retrieves key
from the tuple.
Returns a Command instance for command_name
Return the configuration information for key
.
Reads key
from the configuration
Retrieves header_name
Retrieves the response header field
Retrieves key
from the configuration
Return value associated with key
from database.
Returns nil
if there is no such key
.
See fetch
for more information.
Returns the function mapped to name
, that was created by either Fiddle::Importer.extern
or Fiddle::Importer.bind
Get the value for the parameter with a given key.
If the parameter has multiple values, only the first will be retrieved; use params
to get the array of values.
Returns the header field corresponding to the case-insensitive key. For example, a key of “Content-Type” might return “text/html”