Aha, are these xml's being generate by the same resource? In that case, when making an xml file, make a main xml file called master.xml, which specifies all the filenames of the generated ones. Then get the children, then use my function:
function table.getr(t, min)
return t[math.random(min or 1, table.getn(t))]
end
and then get the attributes and or value. But i cant guarantee itll work