Permission is granted for use, copying, modification, distribution, and distribution of modified versions of this work as long as the above copyright notice is included.
++
FORM_TAGS | = | [ :form, :input, :select, :textarea ] | ||
SELF_CLOSING_TAGS | = | [ :base, :meta, :link, :hr, :br, :param, :img, :area, :input, :col ] | ||
AttrCore | = | [:id, :class, :style, :title] | Common sets of attributes. | |
AttrI18n | = | [:lang, 'xml:lang'.intern, :dir] | ||
AttrEvents | = | [:onclick, :ondblclick, :onmousedown, :onmouseup, :onmouseover, :onmousemove, :onmouseout, :onkeypress, :onkeydown, :onkeyup] | ||
AttrFocus | = | [:accesskey, :tabindex, :onfocus, :onblur] | ||
AttrHAlign | = | [:align, :char, :charoff] | ||
AttrVAlign | = | [:valign] | ||
Attrs | = | AttrCore + AttrI18n + AttrEvents | ||
FORM_TAGS | = | [ :form, :input, :select, :textarea ] | ||
SELF_CLOSING_TAGS | = | [ :base, :meta, :link, :hr, :br, :param, :img, :area, :input, :col ] | ||
AttrCore | = | [:id, :class, :style, :title] | Common sets of attributes. | |
AttrI18n | = | [:lang, 'xml:lang'.intern, :dir] | ||
AttrEvents | = | [:onclick, :ondblclick, :onmousedown, :onmouseup, :onmouseover, :onmousemove, :onmouseout, :onkeypress, :onkeydown, :onkeyup] | ||
AttrFocus | = | [:accesskey, :tabindex, :onfocus, :onblur] | ||
AttrHAlign | = | [:align, :char, :charoff] | ||
AttrVAlign | = | [:valign] | ||
Attrs | = | AttrCore + AttrI18n + AttrEvents |
Hpricot::XML parses input, disregarding all the HTML rules and returning a document tree.
# File lib/hpricot/parse.rb, line 20 def Hpricot.XML(input, opts = {}) Doc.new(make(input, opts.merge(:xml => true))) end
Hpricot::XML parses input, disregarding all the HTML rules and returning a document tree.
# File lib/hpricot/parse.rb, line 20 def Hpricot.XML(input, opts = {}) Doc.new(make(input, opts.merge(:xml => true))) end
# File lib/hpricot/builder.rb, line 6 def self.build(ele = Doc.new, assigns = {}, &blk) ele.extend Builder assigns.each do |k, v| ele.instance_variable_set("@#{k}", v) end ele.instance_eval &blk ele end
# File lib/hpricot/builder.rb, line 6 def self.build(ele = Doc.new, assigns = {}, &blk) ele.extend Builder assigns.each do |k, v| ele.instance_variable_set("@#{k}", v) end ele.instance_eval &blk ele end
Hpricot.parse parses input and return a document tree. represented by Hpricot::Doc.
# File lib/hpricot/parse.rb, line 14 def Hpricot.parse(input = nil, opts = {}, &blk) Doc.new(make(input, opts, &blk)) end
Hpricot.parse parses input and return a document tree. represented by Hpricot::Doc.
# File lib/hpricot/parse.rb, line 14 def Hpricot.parse(input = nil, opts = {}, &blk) Doc.new(make(input, opts, &blk)) end