This is used it identify strings that conform to canonical XML element text.
(Not documented)
# File lib/r4x/e4x.rb, line 32 def ===( str ) str = str.to_s.strip #str[0,1] == '<' && str[-1,1] == '>' # should make more robust (TODO) md = (%r{\A \< (\w+) (.*?) \>}mix).match( str ) return false unless md #[2] =~ %r{xml:cdata=['"]\d+['"]} ed = (%r{\< \/ #{md[1]} [ ]* \> \Z}mix).match(str) return false unless ed true end
Disabled; run with --debug to generate this.