Class: Oga::XML::Cdata

Inherits:
CharacterNode show all
Defined in:
lib/oga/xml/cdata.rb

Overview

Class used for storing information about CDATA tags.

Instance Attribute Summary

Attributes inherited from CharacterNode

#text

Attributes inherited from Node

#node_set

Instance Method Summary collapse

Methods inherited from CharacterNode

#initialize, #inspect

Methods inherited from Node

#after, #before, #children, #children=, #initialize, #next, #next_element, #parent, #previous, #previous_element, #remove, #root_node

Methods included from Traversal

#each_node

Constructor Details

This class inherits a constructor from Oga::XML::CharacterNode

Instance Method Details

#to_xmlString

Converts the node back to XML.


12
13
14
# File 'lib/oga/xml/cdata.rb', line 12

def to_xml
  return "<![CDATA[#{text}]]>"
end