Electronic characterization of single walled carbon nanotubes: a Xanes study