org.marc4j.marcxml
Class MarcXmlHandler

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.marc4j.marcxml.MarcXmlHandler
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class MarcXmlHandler
extends org.xml.sax.helpers.DefaultHandler

MarcXmlHandler is a SAX2 ContentHandler that reports events to the MarcHandler interface.

Version:
$Revision: 1.8 $
Author:
Bas Peters
See Also:
MarcHandler, DefaultHandler

Constructor Summary
MarcXmlHandler()
          Construct a new default instance of the handler
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(String uri, String name, String qName)
           
 void setDocumentLocator(Locator locator)
          Registers the SAX2 Locator object.
 void setMarcHandler(MarcHandler mh)
          Registers the MarcHandler object.
 void startElement(String uri, String name, String qName, Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarcXmlHandler

public MarcXmlHandler()
Construct a new default instance of the handler

Method Detail

setMarcHandler

public void setMarcHandler(MarcHandler mh)

Registers the MarcHandler object.

Parameters:
mh - the MarcHandler object

setDocumentLocator

public void setDocumentLocator(Locator locator)

Registers the SAX2 Locator object.

Specified by:
setDocumentLocator in interface ContentHandler
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler
Parameters:
locator - the Locator object

startElement

public void startElement(String uri,
                         String name,
                         String qName,
                         Attributes atts)
                  throws SAXParseException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
SAXParseException

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(String uri,
                       String name,
                       String qName)
                throws SAXParseException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
SAXParseException


Copyright 2001-2003 Bas Peters. All Rights Reserved.