Class BaseXMLReader

java.lang.Object
org.openstreetmap.osmosis.xml.v0_6.impl.BaseXMLReader
Direct Known Subclasses:
FastXmlReader, XmlChangeReader, XmlReader

public abstract class BaseXMLReader extends Object
Handles common functionality used by XML readers.
  • Constructor Details

    • BaseXMLReader

      public BaseXMLReader(File file, boolean enableDateParsing, CompressionMethod method)
      Default Constructor.
      Parameters:
      file - File to parse
      enableDateParsing - whether to enable date parsing or not
      method - The compression method if any
  • Method Details

    • isEnableDateParsing

      public boolean isEnableDateParsing()
      Returns whether this object enables date parsing or not.
      Returns:
      true or false
    • parseXML

      protected void parseXML(InputStream stream, DefaultHandler handler) throws SAXException, IOException
      Function to parse xml, this default function just uses the SAXParser.
      Parameters:
      stream - InputStream for the XML
      handler - A handler for the XML
      Throws:
      SAXException - If there is any exceptions while parsing the XML
      IOException - If there is any issues with the input stream
    • handleXML

      protected void handleXML(DefaultHandler handler)
      Function to handle the XML for the sub classes.
      Parameters:
      handler - A DefaultHandler