# File lib/dm-serializer/xml/rexml.rb, line 15 def self.add_node(parent, name, value, attrs = {}) node = parent.add_element(name) attrs.each do |attr_name, attr_val| node.attributes[attr_name] = attr_val end node << ::REXML::Text.new(value.to_s) unless value.nil? node end