XANES and XPS studies of titanium aluminophosphate molecular sieves