public void endElement(String uri, String localName, String qName)
            throws SAXException {
        if (qName.equals("name")) {
            name = accumulator.toString().trim();
        } else if (qName.equals("mass")) {
            mass = accumulator.toString().trim();
        } else if (qName.equals("temperature")) {
            temperature = accumulator.toString().trim();
        } else if (qName.equals("StellarClassification")) {
            StellarClassification = accumulator.toString().trim();
        } else if (qName.equals("Star")) {
            System.out.println("Star{" +
                    "name='" + name + '\'' +
                    ", mass='" + mass + '\'' +
                    ", temperature='" + temperature + '\'' +
                    ", StellarClassification='" + StellarClassification + '\'' +
                    "} ");
        } else if (qName.equals("Planet")) {
            System.out.println("Planet{" +
                    "name='" + name + '\'' +
                    ", mass='" + mass + '\'' +
                    "} ");
        } else if (qName.equals("Asteroid")) {
            System.out.println("Asteroid{" +
                    "name='" + name + '\'' +
                    ", mass='" + mass + '\'' +
                    "} ");
        } else if (qName.equals("Satellite")) {
            System.out.println("Satellite{" +
                    "name='" + name + '\'' +
                    ", mass='" + mass + '\'' +
                    "} ");
        }
    }