public class SaxParserCH
extends java.lang.Object
implements org.xml.sax.ContentHandler
SaxParserCH
class imports or exports a given xml file.Modifier and Type | Field and Description |
---|---|
boolean |
debug |
Constructor and Description |
---|
SaxParserCH()
The constructor
SaxParserCH creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int end)
The method
characters is called, if data is placed between start and end tooken. |
void |
endDocument()
The method
endDocument is called if document ends. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName)
The method
endElement is called, if xml-token ends. |
void |
endPrefixMapping(java.lang.String prefix)
The method
endPrefixMapping (see documentation of sax parser). |
java.lang.String |
getListing(java.lang.String fileName)
The method
getListing reads a xml-listing from server. |
void |
ignorableWhitespace(char[] ch,
int start,
int end)
The method
ignorableWhitespace ignores space at data area between start and end token |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
The method
processingInstruction (see documentation of sax parser). |
void |
putListing(java.lang.String fileName,
java.lang.String listing)
The method
putListing writes a xml-listing to server. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
The method
setDocumentLocator (see documentation of sax parser). |
void |
skippedEntity(java.lang.String name)
The method
skippedEntity (see documentation of sax parser). |
void |
startDocument()
The method
startDocument is called if document starts. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String rawName,
org.xml.sax.Attributes atts)
The method
startElement is called, if xml-token starts. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
The method
startPrefixMapping (see documentation of sax parser). |
public SaxParserCH()
SaxParserCH
creates a new instance(object) of the class.public void startDocument() throws org.xml.sax.SAXException
startDocument
is called if document starts.startDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
- if errorpublic void endDocument() throws org.xml.sax.SAXException
endDocument
is called if document ends.endDocument
in interface org.xml.sax.ContentHandler
org.xml.sax.SAXException
- if errorpublic void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes atts) throws org.xml.sax.SAXException
startElement
is called, if xml-token starts.startElement
in interface org.xml.sax.ContentHandler
namespaceURI
- name space.localName
- locale.rawName
- name of token.atts
- attributes of token.org.xml.sax.SAXException
- if error.public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String rawName) throws org.xml.sax.SAXException
endElement
is called, if xml-token ends.endElement
in interface org.xml.sax.ContentHandler
namespaceURI
- name space.localName
- locale.rawName
- name of token.org.xml.sax.SAXException
- if error.public void characters(char[] ch, int start, int end) throws org.xml.sax.SAXException
characters
is called, if data is placed between start and end tooken.characters
in interface org.xml.sax.ContentHandler
ch
- character.start
- index start.end
- index end.org.xml.sax.SAXException
- if error.public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
(see documentation of sax parser).setDocumentLocator
in interface org.xml.sax.ContentHandler
locator
- (see documentation of sax parser).public void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
(see documentation of sax parser).processingInstruction
in interface org.xml.sax.ContentHandler
target
- (see documentation of sax parser).data
- (see documentation of sax parser).org.xml.sax.SAXException
- if errorpublic void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
startPrefixMapping
(see documentation of sax parser).startPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- (see documentation of sax parser).uri
- (see documentation of sax parser).public void endPrefixMapping(java.lang.String prefix)
endPrefixMapping
(see documentation of sax parser).endPrefixMapping
in interface org.xml.sax.ContentHandler
prefix
- (see documentation of sax parser).public void ignorableWhitespace(char[] ch, int start, int end) throws org.xml.sax.SAXException
ignorableWhitespace
ignores space at data area between start and end tokenignorableWhitespace
in interface org.xml.sax.ContentHandler
ch
- character (see documentation of sax parser).start
- index start (see documentation of sax parser).end
- index end (see documentation of sax parser).org.xml.sax.SAXException
- if errorpublic void skippedEntity(java.lang.String name) throws org.xml.sax.SAXException
skippedEntity
(see documentation of sax parser).skippedEntity
in interface org.xml.sax.ContentHandler
name
- (see documentation of sax parser).org.xml.sax.SAXException
- if errorpublic java.lang.String getListing(java.lang.String fileName) throws java.lang.Exception
getListing
reads a xml-listing from server.fileName
- name of xml-file.java.lang.Exception
- if errorpublic void putListing(java.lang.String fileName, java.lang.String listing) throws java.lang.Exception
putListing
writes a xml-listing to server.fileName
- name of xml-file.listing
- the xml-listing.java.lang.Exception
- if error