fi.iki.hsivonen.xml
Class SimpleWikiParser
java.lang.Object
fi.iki.hsivonen.xml.SimpleWikiParser
public class SimpleWikiParser
- extends Object
TODO Warning: Not tested after refactoring. Need to check for permissible characters.
- Version:
- $Id: SimpleWikiParser.java,v 1.2 2006/11/18 00:05:24 hsivonen Exp $
- Author:
- taavi, hsivonen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contentHandler
private ContentHandler contentHandler
errorHandler
private ErrorHandler errorHandler
source
private String source
title
private String title
SimpleWikiParser
public SimpleWikiParser()
setContentHandler
public void setContentHandler(ContentHandler arg0)
- See Also:
XMLReader.setContentHandler(org.xml.sax.ContentHandler)
getContentHandler
public ContentHandler getContentHandler()
- See Also:
XMLReader.getContentHandler()
setErrorHandler
public void setErrorHandler(ErrorHandler arg0)
- See Also:
XMLReader.setErrorHandler(org.xml.sax.ErrorHandler)
getErrorHandler
public ErrorHandler getErrorHandler()
- See Also:
XMLReader.getErrorHandler()
parse
public void parse()
throws IOException,
SAXException
- Throws:
IOException
SAXException
foo
private void foo()
throws SAXException,
IOException
- Takes a string and builds DOM Document of it by scanning the string and
emitting SAX Events for DOMConsumer.
The root element for the document will be .
Multiple linefeeds (1 linefeed here means \n, \r or \r\n) invoke
. Non-empty body always contains at least one p element.
[linkTarget link title] is turned into link title
. Link title
[[ can be used to insert a single '['.
- Parameters:
source
- the string of which the document is built
- Throws:
SAXException
IOException
- if there are problems when loading the DOM class
isWhiteSpace
private boolean isWhiteSpace(char c)
- Checks if the given char is whitespace.
For now whitespace means ' ' or '\t'.
- Parameters:
c
-
- Returns:
- true if give char is whitespace
characters
private void characters(char[] a,
int b,
int c)
throws SAXException
- Throws:
SAXException
startElement
private void startElement(String a,
String b,
String c,
Attributes attrs)
throws SAXException
- Throws:
SAXException
endElement
private void endElement(String a,
String b,
String c)
throws SAXException
- Throws:
SAXException
startDocument
private void startDocument()
throws SAXException
- Throws:
SAXException
endDocument
private void endDocument()
throws SAXException
- Throws:
SAXException