lib/rdf/rdfxml/reader/rexml.rb
# Create a new element child of an existing node
Create a new element child of an existing node
Create a new element child of an existing node
def create_node(name, children)
          native = ::REXML::Element.new(name, @node)
          children.each do |c|
            case c.node
            when ::REXML::Text
              native.add_text(c.node)
            when ::REXML::Element
              native.add_element(c.node)
            when ::REXML::Comment
            else
              raise "Unexpected child node type: #{c.node.class}"
            end
          end
          NodeProxy.new(native, self)
        end
def create_node ( name , children ) native = :: REXML :: Element . new ( name , @node ) children . each do | c | case c . node when :: REXML :: Text native . add_text ( c . node ) when :: REXML :: Element native . add_element ( c . node ) when :: REXML :: Comment else raise "Unexpected child node type: #{c.node.class}" end end NodeProxy . new ( native , self ) end
Create a new element child of an existing node
Create a new element child of an existing node
# Skip comments
name
<not_specific>
children
<not_specific>