| collapse |
Actually converts an XML document element into a data structure.
|
| collapse_content |
Tries to collapse a Hash even more ;-)
|
| collapse_text_node |
Collapses a text node and merges it with an existing Hash, if possible.
Thanks to Curtis Schofield for reporting a subtle bug.
|
| empty |
Checks, if an object is nil, an empty String or an empty Hash. Thanks to
Norbert Gawor for a bugfix.
|
| escape_value |
Replaces XML markup characters by their external entities.
|
| find_xml_file |
Searches in a list of paths for a certain file. Returns the full path to
the file, if it could be found. Otherwise, an exception will be raised.
|
| fold_array |
Folds an Array to a Hash, if possible. Folding happens according to the
content of keyattr, which has to be an array.
|
| fold_array_by_name |
Folds an Array to a Hash, if possible. Folding happens according to the
content of keyattr, which has to be a Hash.
|
| fold_arrays |
Folds all arrays in a Hash.
|
| force_array? |
Checks, if the ‘forcearray’ option has to be used for a certain
key.
|
| get_attributes |
Converts the attributes array of a document node into a Hash. Returns an
empty Hash, if node has no attributes.
|
| get_var |
Called during variable substitution to get the value for the named
variable.
|
| handle_options |
Merges a set of options with the default options.
|
| has_mixed_content? |
Determines, if a document element has mixed content.
|
| hash_to_array |
Attempts to unfold a hash of hashes into an array of hashes. Returns a
reference to th array on success or the original hash, if unfolding is not
possible.
|
| load_xml_file |
Loads and parses an XML configuration file.
|
| merge |
Adds a new key/value pair to an existing Hash. If the key to be added does
already exist and the existing value associated with key is not an Array,
it will be converted into an Array. Then the new value is appended to that
Array.
|
| node_to_text |
Converts a document node into a String. If the node could not be converted
into a String for any reason, default will be returned.
|
| normalise_space |
Removes leading and trailing whitespace and sequences of whitespaces from a
string.
|
| normalize_option_names |
Normalizes option names in a hash, i.e., turns all characters to lower case
and removes all underscores. Additionally, this method checks, if an
unknown option was used and raises an according exception.
|
| parse |
Parses an XML string and returns the according document.
|
| put_into_cache |
Caches the data belonging to a certain file.
|
| scalar |
Checks, if a certain value is a "scalar" value. Whatever that
will be in Ruby … ;-)
|
| set_var |
Called when a variable definition is encountered in the XML. A variable
definition looks like
|
| value_to_xml |
Recurses through a data structure building up and returning an XML
representation of that structure as a string.
|
<code/>and<pre/>for code samples.