X-ray absorption near edge structures (XANES) in simple and complex Mn compounds