def xcworkspace_element_start_xml(depth, elem)
      attributes = case elem.name
                   when 'Group'
                     %w(location name)
                   when 'FileRef'
                     %w(location)
                   end
      contents = "<#{elem.name}"
      indent = '   ' * depth
      attributes.each { |name| contents += "\n   #{name} = \"#{elem.attribute(name)}\"" }
      contents.split("\n").map { |line| "#{indent}#{line}" }.join("\n") + ">\n"
    end
def xcworkspace_element_start_xml(depth, elem)
      attributes = case elem.name
                   when 'Group'
                     %w(location name)
                   when 'FileRef'
                     %w(location)
                   end
      contents = "<#{elem.name}"
      indent = '   ' * depth
      attributes.each { |name| contents += "\n   #{name} = \"#{elem.attribute(name)}\"" }
      contents.split("\n").map { |line| "#{indent}#{line}" }.join("\n") + ">\n"
    end
@param  [Integer] depth The depth of the element in the tree
 @param  [REXML::Document::Element] elem The XML element to format.

 @return [String] The Xcode-specific XML formatting of an element start