Method: Nokogiri::XML::Node#children=
- Defined in:
- lib/nokogiri/xml/node.rb
#children=(node_or_tags) ⇒ Object
Set the content for this Node node_or_tags
node_or_tags
can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String containing markup.
Also see related method inner_html=
349 350 351 352 353 354 355 356 357 |
# File 'lib/nokogiri/xml/node.rb', line 349 def children=() = coerce() children.unlink if .is_a?(XML::NodeSet) .each { |n| add_child_node_and_reparent_attrs(n) } else add_child_node_and_reparent_attrs() end end |