Remove duplicates from a list by attribute

Subject: Remove duplicates from a list by attribute
From: Mitch Christensen <mitch_christensen@xxxxxxxxx>
Date: Tue, 16 Nov 1999 15:04:33 -0800
Hi,

I know that a variation of this was posted previously, with a solution for sub-elements.  But given the following...

<a>
    <s name="foo" content="bar"/>
    <s name="fiz" content="baz"/>
</a>
<b>
    <s name="foo" content="bar"/>
    <s name="fiz" content="baz"/>
</b>

Does anyone know how to generate the following (removing dups)...

<s name="foo" content="bar"/>
<s name="fiz" content="baz"/>

Any help would be greatly appreciated.

-Mitch
 

Current Thread