# Displaying xml records

**URL:** <https://forum.kirupa.com/t/displaying-xml-records/209776>\
**Category:** flash\
**Created:** [December 12, 2006, 11:05am UTC](https://forum.kirupa.com/t/displaying-xml-records/209776 "2006-12-12T11:05:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy11983](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@andy11983](https://forum.kirupa.com/u/andy11983)\
**Post date:** [December 12, 2006, 11:05am UTC](https://forum.kirupa.com/t/displaying-xml-records/209776/1 "2006-12-12T11:05:00Z")

</div>

hi guys,

i have an error displaying my xml data i have markers placed on a map to indicate specific locations , however when i click on them i want a text box to be populated with the name of the unit that has been clicked on (if you get what i mean) current it displays the same name for each unit which is wrong- which it displayes the last name in the xml file.

can anybody please help

appreciate any and all help as always guys

thanks

andy

```auto

for (var j:Number = 1; j<= cLocation.length; j++)
			{   
				var coords:Array= cLocation[j-1].split(","); 
				//trace("yes" + coords[0] );
				var type:String = coords[0];
				var thisX:Number = coords[1];   
				var thisY:Number = coords[2]; 
				var thisName:String = coords[3];

				trace("uname" + thisName);
				// linkage_id, instance name, depth, init 
				if (type == "office") {
					
					_root.attachMovie("graph_offcice", "marker"+j, _root.getNextHighestDepth(), {_x:thisX, _y:thisY});
					testGraphic.messy = "bob";
				

				}
				else {
					_root.attachMovie("graph_stores", "marker"+j, _root.getNextHighestDepth(), {_x:thisX, _y:thisY});
				}
		} 

```

andy
