# File lib/edi4r/edifact-rexml.rb, line 165
    def to_din16557_4( xel, rep=nil )
      prefix = name
      prefix += rep.to_s if rep
      names.uniq.each do |nm|
        # Array of all items with this name
        a = self[nm]; max = a.size
        raise "DIN16557-4 does not support more than 9 repetitions" if max > 9
        raise "Lookup error (should never occur)" if max == 0
        if max == 1
          obj = a.first
          obj.to_din16557_4( xel, nil, prefix ) unless obj.empty?
        else
          a.each_with_index do |obj, i| 
            obj.to_din16557_4( xel, i+1, prefix ) unless obj.empty?
          end
        end
      end
    end