Class: Nori::Parser::Nokogiri::Document::CDataText

Inherits:
String
  • Object
show all
Defined in:
lib/nori/parser/nokogiri.rb

Overview

Marks a text node that came from a CDATA section so the whitespace stripping in #end_element and #characters leaves it alone. A CDATA section is the author's explicit literal-data marker (XML 1.0 ยง2.7), so its content is real even when it is only whitespace and is never trimmed. The marker never reaches the output because XMLUtilityNode#inner_html joins children into a plain string.