> SELECT WorkListXMLCursor > SCAN > m.GroupHeading = GroupHeading > DO WHILE GroupHeading = m.GroupHeading > SKIP > REPLACE GroupHeading WITH '' > ENDDO > ENDSCAN >I think your logic is wrong. If you skip within the Do While, before the Replace, the first record with the *next* GroupHeading will be blanked. Try this.
LOCAL m.FirstTime, m.CurrentGroupHeading m.FirstTime = .T. SELECT WorkListXMLCursor SET ORDER TO TAG GroupHeading && or whatever it's called m.CurrentGroupHeading = GroupHeading SCAN * Never replace the first record IF m.FirstTime m.FirstTime = .F. LOOP ENDIF IF GroupHeading = m.CurrentGroupHeading REPLACE GroupHeading WITH '' ELSE m.CurrentGroupHeading = GroupHeading ENDIF ENDSCANUntested....