static public Method

XmlMarkup.new(options={})

Create an XML markup builder. Parameters are specified by an option hash.

:target=>target_object:Object receiving the markup. out must respond to the << operator. The default is a plain string target.
:indent=>indentation:Number of spaces used for indentation. The default is no indentation and no line breaks.
:margin=>initial_indentation_level:Amount of initial indentation (specified in levels, not spaces).
:escape_attrs=><b>OBSOLETE:The :escape_attrs option is no longer supported by builder (and will be quietly ignored). String attribute values are now automatically escaped. If you need unescaped attribute values (perhaps you are using entities in the attribute values), then give the value as a Symbol. This allows much finer control over escaping attribute values.</b>

Source Code

# File builder/xmlmarkup.rb, line 185
def initialize(options={})
  indent = options[:indent] || 0
  margin = options[:margin] || 0
  super(indent, margin)
  @target = options[:target] || ""
end
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.