public Method

XmlMarkup.instruct!(directive_tag=:xml, attrs={})

Insert a processing instruction into the XML markup. E.g.

For example:

xml.instruct!
    #=> <?xml version="1.0" encoding="UTF-8"?>
xml.instruct! :aaa, :bbb=>"ccc"
    #=> <?aaa bbb="ccc"?>

Source Code

# File builder/xmlmarkup.rb, line 238
def instruct!(directive_tag=:xml, attrs={})
  _ensure_no_block block_given?
  if directive_tag == :xml
    a = { :version=>"1.0", :encoding=>"UTF-8" }
    attrs = a.merge attrs
  end
  _special(
  "<?#{directive_tag}",
  "?>",
  nil,
  attrs,
  [:version, :encoding, :standalone])
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.