def x(name, *args)
      n = Element.new(name)
      yielded = if block_given?
                  yield
                else 
                  []
                end
      unless yielded.is_a?(Array)
        yielded = [yielded]
      end
      values = args + yielded

      values.each do |val|
        case val
        when Hash
          val.each { |k,v| n[k.to_s] = v }
        when Array
          val.each { |c| n << c if c}
        else
          n << val if val
        end
      end

      n
    end
def x(name, *args)
      n = Element.new(name)
      yielded = if block_given?
                  yield
                else 
                  []
                end
      unless yielded.is_a?(Array)
        yielded = [yielded]
      end
      values = args + yielded

      values.each do |val|
        case val
        when Hash
          val.each { |k,v| n[k.to_s] = v }
        when Array
          val.each { |c| n << c if c}
        else
          n << val if val
        end
      end

      n
    end
args = attributes and/or children in any order, multiple appearance is possible
 @overload build(name,attributes,children)
   @param [String] name name of the Element
   @param [Hash] attributes
   @param [String|Element|Array] children text, child element or array of elements