Code example for ContentHandler

Methods: endPrefixMapping

0
 
    @Override 
    public void endPrefixMapping(String prefix) throws SAXException {
        // ignore all mappings 
        if (contentHandler != null) {
            contentHandler.endPrefixMapping(prefix);
        } 
    } 
 
    @Override 
    public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
        content.setLength(0);
        if (!checkNamespace(uri)) {
            return; 
        } 
        switch (localName) {
            case RECORD: { 
                // get format and type 
                String format = "MARC21";
                String type = " Bibliographic";
                for (int i = 0; i < atts.getLength(); i++) {