Hilbert II - Version 0.03.04

org.qedeq.kernel.xml.tracker
Class XPathLocationParser

java.lang.Object
  extended byorg.qedeq.kernel.xml.tracker.XPathLocationParser
All Implemented Interfaces:
ContentHandler

public class XPathLocationParser
extends Object
implements ContentHandler

Parser for XML files. This class uses features specific for Xerces.

Version:
$Revision: 1.17 $

Constructor Summary
XPathLocationParser(String xpath)
          Constructor.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String namespaceURI, String localName, String qName)
           
 void endPrefixMapping(String prefix)
           
 SimpleXPath getFind()
          Get searched XPath.
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void parse(File file)
          Parses XML file.
 void parse(String fileName)
          Parses XML file.
 void parse(TextInput input)
          Parses XML file.
 void processingInstruction(String target, String data)
           
 void setDocumentLocator(Locator locator)
          Receive a Locator object for document events.
 void skippedEntity(String name)
           
 void startDocument()
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
           
 void startPrefixMapping(String prefix, String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathLocationParser

public XPathLocationParser(String xpath)
                    throws ParserConfigurationException,
                           SAXException
Constructor.

Parameters:
xpath - XML file path.
Throws:
ParserConfigurationException - Severe parser configuration problem.
SAXException
Method Detail

parse

public final void parse(String fileName)
                 throws SAXException,
                        IOException
Parses XML file.

Parameters:
fileName - Parse this input.
Throws:
SAXException - Syntactical or semantical problem occurred.
IOException - Technical problem occurred.

parse

public final void parse(File file)
                 throws SAXException,
                        IOException
Parses XML file.

Parameters:
file - Parse this input.
Throws:
SAXException - Syntactical or semantical problem occurred.
IOException - Technical problem occurred.

parse

public final void parse(TextInput input)
                 throws SAXException,
                        IOException
Parses XML file.

Parameters:
input - Parse this input.
Throws:
SAXException - Syntactical or semantical problem occurred.
IOException - Technical problem occurred.

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Throws:
SAXException

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Throws:
SAXException

skippedEntity

public void skippedEntity(String name)
                   throws SAXException
Specified by:
skippedEntity in interface ContentHandler
Throws:
SAXException

setDocumentLocator

public final void setDocumentLocator(Locator locator)
Receive a Locator object for document events. Store the locator for use with other document events.

Specified by:
setDocumentLocator in interface ContentHandler
Parameters:
locator - A locator for all SAX document events.
See Also:
ContentHandler.setDocumentLocator(org.xml.sax.Locator), Locator

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Throws:
SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Throws:
SAXException

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Throws:
SAXException

getFind

public SimpleXPath getFind()
Get searched XPath. Possibly the start and end location are set.

Returns:
Searched XPath.

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.