I've done it :-)
for each(var address:XML in dataXML.children()){ var buildingNumber = address.attribute("Building_Number").toString().replace(/[^0-9]/g, ""); addre...@building_numeric = buildingNumber; } Is there a better or quicker way to do this? Thanks, Nick 2009/8/25 Nick Middleweek <n...@middleweek.co.uk> > Hello, > > I've got some XML data in a variable called dataXML, it looks similar to > this... > > <addresses> > <address building_number="1" /> > <address building_number="1a" /> > <address building_number="1b" /> > <address building_number="2" /> > <address building_number="3" /> > <address building_number="4" /> > <address building_number="4a" /> > /<addresses> > > > What I'd like to do is loop round the data and add another attribute called > building_numeric which is the parseInt(building_number attribute). > > I'm sure this is really easy but can someone give me a pointer please... > I'm getting a tad lost... > > > Thank you, > Nick > >