Angle resolved near edge X-ray absorption measurements (NEXAFS) are used to access the existence and concentration of the two allotropic phases, cubic (β-GaN) and hexagonal (α-GaN), that coexist in a mixed-phase GaN sample grown by ECR-MBE. The resonance intensities in the NEXAFS spectra from a pure cubic GaN sample are independent of the angle of incidence ϑ, while they have a characteristic angular dependence on cos2ϑ for the hexagonal material, i.e. I=A±Bcos2ϑ. From the values of A and B the bond orientations with respect to the surface normal are calculated. Furthermore, the NEXAFS resonances in a pure α- or β-GaN sample appear at characteristic energies which are independent of the angle of incidence ϑ. Contrary to that the NEXAFS resonances in the spectra from a mixed-phase GaN show a characteristic ϑ-dependent shift. On the basis of this finding, a method is proposed and applied for the determination of the fractions of the co-existing polytypes in a mixed-phase sample.