Class

XmlBase

Extends:

XmlBase is a base class for building XML builders. See Builder::XmlMarkup and Builder::XmlEvents for examples.

Public Methods
<< Append text to the output target without escaping any markup. May be used within the markup brackets as:
method_missing Create XML markup based on the name of the method. This method is never invoked directly, but is called for each markup method in the markup block.
new Create an XML markup builder.
nil? For some reason, nil? is sent to the XmlMarkup object. If nil? is not defined and method_missing is invoked, some strange kind of recursion happens. Since nil? won’t ever be an XML tag, it is pretty safe to define it here. (Note: this is an example of cargo cult programming, cf. fishbowl.pastiche.org/2004/10/13/cargo_cult_progra...).
tag! Create a tag named sym. Other than the first argument which is the tag name, the arguments are the same as the tags implemented via method_missing.
text! Append text to the output target. Escape any markup. May be used within the markup brackets as:
Private Methods
_escape
_escape_quote
_indent
_nested_structures
_newline
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.