# XML/Removing Duplicates

**URL:** <https://forum.kirupa.com/t/xml-removing-duplicates/277612>\
**Category:** flash\
**Created:** [December 14, 2008, 8:52pm UTC](https://forum.kirupa.com/t/xml-removing-duplicates/277612 "2008-12-14T20:52:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CforConfused](https://avatars.discourse-cdn.com/v4/letter/c/e19adc/32.png) [@CforConfused](https://forum.kirupa.com/u/CforConfused)\
**Post date:** [December 14, 2008, 8:52pm UTC](https://forum.kirupa.com/t/xml-removing-duplicates/277612/1 "2008-12-14T20:52:47Z")

</div>

Hi there!

So Here is my dilemma. A couple of days ago I was having trouble accessing information from nodes from an xml file and flowing them into movie clips with text fields I had created.

I miraculously figured out how to fix that, now I have another problem:

Some of the information tend to repeat themselves more than once. For example, there are various project names with the same keyword.  
How would I go about flowing each keyword only once?

```auto
index.onLoad = function(){

	var items = index.firstChild.childNodes;
	var projectStarter:Number = 0;
	var projectStartingPoint:Number = 0;
	var rootNode:XMLNode = this.firstChild;
	var categories:Number = rootNode.childNodes.length;

	for (i=0; i<categories; i++) {
		
		categoryName = items*.attributes.title;
		
		mcIndex1["mc"+i].t1.text = categoryName;
		mcIndex1["mc"+i].t1.setTextFormat(off);
		mcIndex1["mc"+i].t1.selectable = false;

		project_category = rootNode.childNodes*;
		projects = project_category.childNodes.length;
		pp = 0;

		for (p=projectStartingPoint; p<projectStartingPoint+projects; p++) {
			project_name=items*.childNodes[pp].attributes.title
			segment = items*.childNodes[pp].firstChild.attributes.title;
			keywords = items*.childNodes[pp].childNodes[1].attributes.title;
			clients = items*.childNodes[pp].childNodes[1].nextSibling.attributes.name;
			//images= items*.childNodes[pp].childNodes[1].nextSibling.nextSibling.childNodes
			
			mcIndex2["mc"+p].t1.text =project_name;
			mcIndex2["mc"+p].t1.setTextFormat(off);
			mcIndex2["mc"+p].t1.selectable = false;
		
			mcIndex3["mc"+p].t1.text = project_name;
			mcIndex3["mc"+p].t1.setTextFormat(off);
			mcIndex3["mc"+p].t1.selectable= false;
				
			mcIndex4["mc"+p].t1.text = segment;
			mcIndex4["mc"+p].t1.setTextFormat(off);
			mcIndex4["mc"+p].t1.selectable = false;			
			
			mcIndex5["mc"+p].t1.text=clients ;
			mcIndex5["mc"+p].t1.setTextFormat(off);
			mcIndex5["mc"+p].t1.selectable = false;			

			mcIndex6["mc"+p].t1.text =keywords;
			mcIndex6["mc"+p].t1.setTextFormat(off);
			mcIndex6["mc"+p].t1.selectable = false;			
			projectStarter++;
			pp++;
			
		
		}
		projectStartingPoint = projectStarter;
	};
}

index.load("index.xml");

```
