Code example for Attributes

Methods: getLength

0
            return; 
        } 
        if (qName.equals("employee")) {
            System.out.println(qName);
        } 
        if (attributes.getLength() > 0) {
            this.attributes = attributes;
            this.hasAttribute = true;
        } 
    } 
 
    @Override 
    public void endElement(String uri, String localName, String qName) throws SAXException {
        if (hasAttribute && (attributes != null)) {
            for (int i = 0; i < attributes.getLength(); i++) {
                System.out.println(attributes.getQName(0) + attributes.getValue(0));
            } 
        } 
    } 
 
    @Override