org.webdocwf.util.loader
Class LoaderXIncluder

java.lang.Object
  extended byorg.xml.sax.HandlerBase
      extended byorg.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.
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          Processing DOCTYPE deklaration
 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, 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.
Throws:
java.io.UnsupportedEncodingException

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.

Parameters:
argv - represents input parmeters

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.

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
Processing DOCTYPE deklaration

Parameters:
publicId - is public ID of document
systemId - is system ID of document
Returns:
null

processingInstruction

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

Parameters:
target - is target
data - is target data

startDocument

public void startDocument()
Start document.


startElement

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

Parameters:
name - is name of the tag
atts - is attributes of the tag

characters

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

Parameters:
ch - is array of characters
start - is int
length - is length of the input parameters
Throws:
org.xml.sax.SAXException

ignorableWhitespace

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

Parameters:
ch - is array of characters
start - is int
length - is length of the input parameters

endElement

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

Parameters:
name - is name of the tag

endDocument

public void endDocument()
End document.


warning

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

Parameters:
ex - is SAXParseException exception

error

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

Parameters:
ex - is SAXParseException exception

fatalError

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

Parameters:
ex - is SAXParseException exception
Throws:
org.xml.sax.SAXException


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