Returns this attribute out as XML source, expanding
the name
a = Attribute.new( “x”, “y” ) a.to_string # ->
“x=‘y’” b = Attribute.new( “ns:x”, “y” ) b.to_string # ->
“ns:x=‘y’”
# File lib/rexml/attribute.rb, line 107
def to_string
if @element and @element.context and @element.context[:attribute_quote] == :quote
%#@expanded_name="#{to_s().gsub(/"/, '"e;')}"^
else
"#@expanded_name='#{to_s().gsub(/'/, ''')}'"
end
end