Class: Nokogiri::XML::Element
- Inherits:
-
Object
- Object
- Nokogiri::XML::Element
- Defined in:
- lib/xliff/xml_extensions.rb
Overview
Helpers for operating on XML Elements
Instance Method Summary collapse
-
#add_leaf_node(element:, content:) ⇒ Void
private
Adds a simple Text Node as a child element.
Instance Method Details
#add_leaf_node(element:, content:) ⇒ Void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Adds a simple Text Node as a child element
18 19 20 21 22 |
# File 'lib/xliff/xml_extensions.rb', line 18 def add_leaf_node(element:, content:) node = document.create_element(element) node.content = content add_child(node) end |