*  @return the list of categories that page is in
     *  @throws IOException if a network error occurs
     *  @since 0.16
     */
    public String[] getCategories(String title) throws IOException
    {
        String url = query + "prop=categories&cllimit=max&titles=" + URLEncoder.encode(title, "UTF-8");
        String line = fetch(url, "getCategories");

        // xml form: <cl ns="14" title="Category:1879 births" />
        ArrayList<String> categories = new ArrayList<String>(750);
        for (int a = line.indexOf("<cl "); a > 0; a = line.indexOf("<cl ", ++a))
            categories.add(decode(parseAttribute(line, "title", a)));
        
        int temp = categories.size();
        log(Level.INFO, "Successfully retrieved categories of " + title + " (" + temp + " categories)", "getCategories");
        return categories.toArray(new String[temp]);
    }