Hi Wally, I'm not sure I fully understand your problem. Let me apologize up front if this is not what you need. Let me first describe what I think you have.
It seems that you want to avoid showing duplicate holidays in the output.
You would like to have the XML parser do it for you.
Duplicates are identified using the Holiday and Day fields.
If I'm right, this suggestion won't help you much. First, organize your loop so that it first creates a "duplicate test key"; I'll call that DTK Judging from the way you are constructing the output string, a "duplicate master list" would be easiest; I'll call that DML.Initialize your DML to empty for the start of each month's processing. Before adding to the output string and after loading up holy and soly...
Construct DTK (DTK=holy+soly;).
if DTK is a substring of DML skip the data
if DTK is not a substring of DML, extend your output string AND append DTK to DML.
This will strip duplicates from your XML input stream regardless of sort order.