gained importance in Goryeo, and were the centerpiece of most education in the Joseon dynasty. The tutelage provided at the hyanggyo, seowon, and Sungkyunkwan was aimed primarily at preparing students for the gwageo and their subsequent career in government service. Under Joseon law, high office was closed to those who were not children of officials of the second full rank or higher (Yangban), unless the candidate had passed the gwageo. Those who passed the higher literary examination came to monopolize all of the dynasty's high positions of state. Ranks under the Qing dynasty The Qing dynasty (1644–1912) divided the bureaucracy into civil and military positions, both having nine grades or ranks, each subdivided into primary and secondary categories. Civil appointments ranged from attendant to the emperor or a Grand Secretary in the Forbidden City (highest) to being a county magistrate, prefectural tax collector, deputy jail warden, deputy police commissioner or tax examiner. Military appointments ranged from being a field marshal or chamberlain of the imperial bodyguard to a third class sergeant, corporal or a first or second class private. In the table below, "na" is shorthand for the "nth rank, primary" (正n品), which is a higher sub-rank than "nth rank, secondary" (從n品), denoted as "nb" in the table. See also Yangban – the traditional ruling class or gentry of dynastic Korea during the Joseon dynasty Kapitan Cina – the Chinese officership or mandarinate of colonial Indonesia Cabang Atas – the Chinese gentry of colonial Indonesia References External links Government of Imperial China Joseon dynasty Nguyen dynasty History of Imperial China Public administration