method

expand

Importance_0
v2_2_9 - Show latest stable - 0 notes - Class: REXML::Text
expand(ref, doctype, filter) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rexml/text.rb, line 406
    def Text.expand(ref, doctype, filter)
      if ref[1] == ##
        if ref[2] == xx
          [ref[3...-1].to_i(16)].pack('U*')
        else
          [ref[2...-1].to_i].pack('U*')
        end
      elsif ref == '&'
        '&'
      elsif filter and filter.include?( ref[1...-1] )
        ref
      elsif doctype
        doctype.entity( ref[1...-1] ) or ref
      else
        entity_value = DocType::DEFAULT_ENTITIES[ ref[1...-1] ]
        entity_value ? entity_value.value : ref
      end
    end
Register or log in to add new notes.