Module provides the build methods in an independent namespace.

Methods
Public Instance methods
attlist!( *args )
# File lib/facets/more/rexmlbuilder.rb, line 238
  def attlist!( *args )
    REXML::AttlistDecl.new( *args )
  end
cdata( str, *args )
# File lib/facets/more/rexmlbuilder.rb, line 224
  def cdata( str, *args )
    REXML::CData.new( str, *args )
  end
comment( str, *args )
# File lib/facets/more/rexmlbuilder.rb, line 220
  def comment( str, *args )
    REXML::Comment.new( str, *args )
  end
doctype!( *args )

DTD declarations

# File lib/facets/more/rexmlbuilder.rb, line 230
  def doctype!( *args )
    REXML::DocType.new( *args )
  end
document( options={} )

New REXML document.

This method is also aliased as new
# File lib/facets/more/rexmlbuilder.rb, line 175
  def document( options={} )
    #@options = options
    doc = REXML::Document.new
    # xml declaration
    if options[:version]
      doc << xml(
        options[:version],
        options[:encoding],
        options[:standalone]
      )
    end
    doc
  end
element( tag, *args )
# File lib/facets/more/rexmlbuilder.rb, line 198
  def element( tag, *args )
    keys = (Hash === args.last ? args.pop : {})
    skeys = {}
    keys.each { |k,v| skeys[k.to_s] =  v.to_s }
    e = REXML::Element.new( tag )
    e.add_attributes( skeys )
    e.add_text(args.join(' ')) unless args.empty?
    e
  end
element!( *args )
# File lib/facets/more/rexmlbuilder.rb, line 234
  def element!( *args )
    REXML::ElementDecl.new( *args )
  end
entity!( *args )
# File lib/facets/more/rexmlbuilder.rb, line 242
  def entity!( *args )
    REXML::EntityDecl.new( *args )
  end
instruct( name, *args )
This method is also aliased as instruction pi
# File lib/facets/more/rexmlbuilder.rb, line 208
  def instruct( name, *args )
    keys = (Hash === args.last ? args.pop : {})
    content = ( args + keys.collect{ |k,v| %{#{k}="#{v}"} } ).join(' ')
    REXML::Instruction.new( name, content.strip )
  end
instruction( name, *args )

Alias for instruct

new( options={} )

Alias for document

notation!( *args )
# File lib/facets/more/rexmlbuilder.rb, line 246
  def notation!( *args )
    REXML::NotationDecl.new( *args )
  end
pi( name, *args )

Alias for instruct

raw( str )

Add raw XML markup

# File lib/facets/more/rexmlbuilder.rb, line 169
  def raw( str )
    REXML::Document.new( "<root>#{str}</root>" ).root.to_a
  end
text( str, *args )
# File lib/facets/more/rexmlbuilder.rb, line 216
  def text( str, *args )
    REXML::Text.new( str, *args )
  end
xml( version=nil, *args )

XML declaration instruction.

# File lib/facets/more/rexmlbuilder.rb, line 194
  def xml( version=nil, *args )
    REXML::XMLDecl.new( version=nil, *args )
  end