Method: REXML::Text#value
- Defined in:
-
lib/extensions/rexml/rexml/text.rb,
lib/extensions/rhoxml/rexml/text.rb
Returns the string value of this text. This is the text without entities, as it might be used programmatically, or printed to the console. This ignores the ‘raw’ attribute setting, and any entity_filter.
# Assume that the entity "s" is defined to be "sean", and that the
# entity "r" is defined to be "russell"
t = Text.new( "< & sean russell", false, nil, false, ['s'] )
t.value #-> "< & sean russell"
t = Text.new( "< & &s; russell", false, nil, false )
t.value #-> "< & sean russell"
u = Text.new( "sean russell", false, nil, true )
u.value #-> "sean russell"
245 246 247 248 |
# File 'lib/extensions/rexml/rexml/text.rb', line 245 def value return @unnormalized if @unnormalized @unnormalized = Text::unnormalize( @string, doctype ) end |