Module | XOXO
In: | lib/facets/more/xoxo.rb

# XOXO

XOXO is a Ruby XOXO parser and generator. It provides a Ruby API similar to Marshal and YAML (though more specific) to load and dump XOXO, an simple, open outline format written in standard XHTML and suitable for embedding in (X)HTML, Atom, RSS, and arbitrary XML.

### Methods

dump load

### Public Class methods

dump(struct, options={})

Return a XOXO string corresponding to the Ruby object `struct`, translated to the following rules:

- Arrays become ordered lists `<ol>`.
- Hashes become definition lists `<dl>`, keys are stringified with `to_s`.
- Everything else becomes stringified with `to_s` and wrapped in appropriate list elements (`<li>` or `<dt>`/`<dd>`).

Additionally, you can pass these options on the options hash:

`:html_wrap` => `true`: | Wrap the XOXO with a basic XHTML 1.0 Transitional header.
`:css` => css: | Reference css as stylesheet for the wrapped XOXO document.

load(xoxo)

Load and return a XOXO structure from the String, IO or StringIO or xoxo.

[Validate]