I have a tilde delimited file that I need to convert to an xml file. I have the initial conversion step done(an exact representation, just in xml) and some of the more complicated conversion(representing the 1 to many relationships) done with xquery. I am stuck with removing duplicates. The source file(tilde delimited) can have repeating rows of customer information because there are two levels of information in the file. I am getting a result with the right representation, but I cannot keep it from repeating the customer info based on how many times it shows up in source file.
the source file
the conversion file
destination supposed to look like this