class HTree::ETag

Public Class Methods

parse(raw_string, is_xml, is_html) click to toggle source
# File htree/parse.rb, line 283
def ETag.parse(raw_string, is_xml, is_html)
  unless /\A#{Pat::EndTag_C}\z/o =~ raw_string
    raise HTree::Error, "cannot recognize as end tag: #{raw_string.inspect}"
  end

  qname = $1
  qname = qname.downcase if !is_xml && is_html

  result = self.new(qname)
  result.raw_string = raw_string
  result
end