org.webdocwf.util.loader
Class LoaderXIncluder

java.lang.Object
  |
  +--org.xml.sax.HandlerBase
        |
        +--org.webdocwf.util.loader.LoaderXIncluder
All Implemented Interfaces:
org.xml.sax.DocumentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class LoaderXIncluder
extends org.xml.sax.HandlerBase

LoaderXIncluder.java This class parses a document (text or xml file) and writes the documents contents back to standard output.


Constructor Summary
LoaderXIncluder()
          Constructor of class without parameters.
LoaderXIncluder(java.io.OutputStream out)
          Construct object LoaderXIncluder with associated outputStream.
LoaderXIncluder(java.io.OutputStream out, java.lang.String encoding)
          Construct object LoaderXIncluder with associated outputStream and encoding.
 
Method Summary
 void characters(char[] ch, int start, int length)
          Characters.
 void endDocument()
          End document.
 void endElement(java.lang.String name)
          End element.
 void error(org.xml.sax.SAXParseException ex)
          Error.
 void fatalError(org.xml.sax.SAXParseException ex)
          Fatal error.
 void ignorableWhitespace(char[] ch, int start, int length)
          Ignorable whitespace.
static void main(java.lang.String[] argv)
          Main program entry point.
 void parseURI(java.lang.String uri)
          Method parseUri parses a file "uri" and writes the file contents back to standard output including contents of 'include' files .
 void processingInstruction(java.lang.String target, java.lang.String data)
          Processing instruction.
 void startDocument()
          Start document.
 void startElement(java.lang.String name, org.xml.sax.AttributeList atts)
          Start element.
 void warning(org.xml.sax.SAXParseException ex)
          Warning.
 
Methods inherited from class org.xml.sax.HandlerBase
notationDecl, resolveEntity, setDocumentLocator, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderXIncluder

public LoaderXIncluder()
Constructor of class without parameters.


LoaderXIncluder

public LoaderXIncluder(java.io.OutputStream out,
                       java.lang.String encoding)
                throws java.io.UnsupportedEncodingException
Construct object LoaderXIncluder with associated outputStream and encoding.

Parameters:
out - - OutputStream where will be written final XML.
encoding - - encoding String representation of encoding.

LoaderXIncluder

public LoaderXIncluder(java.io.OutputStream out)
Construct object LoaderXIncluder with associated outputStream. Class uses default "UTF-8" encoding.

Parameters:
out - - OutputStream where will be written final XML.
Method Detail

main

public static void main(java.lang.String[] argv)
Main program entry point.


parseURI

public void parseURI(java.lang.String uri)
Method parseUri parses a file "uri" and writes the file contents back to standard output including contents of 'include' files .

Parameters:
uri - - Name of XML file.

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Processing instruction.

Specified by:
processingInstruction in interface org.xml.sax.DocumentHandler
Overrides:
processingInstruction in class org.xml.sax.HandlerBase

startDocument

public void startDocument()
Start document.

Specified by:
startDocument in interface org.xml.sax.DocumentHandler
Overrides:
startDocument in class org.xml.sax.HandlerBase

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.AttributeList atts)
Start element.

Specified by:
startElement in interface org.xml.sax.DocumentHandler
Overrides:
startElement in class org.xml.sax.HandlerBase

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Characters.

Specified by:
characters in interface org.xml.sax.DocumentHandler
Overrides:
characters in class org.xml.sax.HandlerBase
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Ignorable whitespace.

Specified by:
ignorableWhitespace in interface org.xml.sax.DocumentHandler
Overrides:
ignorableWhitespace in class org.xml.sax.HandlerBase

endElement

public void endElement(java.lang.String name)
End element.

Specified by:
endElement in interface org.xml.sax.DocumentHandler
Overrides:
endElement in class org.xml.sax.HandlerBase

endDocument

public void endDocument()
End document.

Specified by:
endDocument in interface org.xml.sax.DocumentHandler
Overrides:
endDocument in class org.xml.sax.HandlerBase

warning

public void warning(org.xml.sax.SAXParseException ex)
Warning.

Specified by:
warning in interface org.xml.sax.ErrorHandler
Overrides:
warning in class org.xml.sax.HandlerBase

error

public void error(org.xml.sax.SAXParseException ex)
Error.

Specified by:
error in interface org.xml.sax.ErrorHandler
Overrides:
error in class org.xml.sax.HandlerBase

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Fatal error.

Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Overrides:
fatalError in class org.xml.sax.HandlerBase
org.xml.sax.SAXException


Copyright © 2002-2003 Together - the Workgroup. All Rights Reserved.