de.zeigermann.xpa
Class DefaultXMLFragmentHandler

java.lang.Object
  |
  +--de.zeigermann.xpa.DefaultXMLFragmentHandler
All Implemented Interfaces:
XMLFragmentHandler

public class DefaultXMLFragmentHandler
extends Object
implements XMLFragmentHandler

This class implements XMLFragmentHandler with empty method bodies for convenience.


Constructor Summary
DefaultXMLFragmentHandler()
           
 
Method Summary
 void cdata(String cdata)
          Receives notification of character data.
 void comment(String comment)
          Receives notification of a comment.
 void doctype(String rootElement, String pubId, String sysId, String internalDTD)
          Receives notification of the document type declaration of the XML document.
 void emptyElement(String name, AttributesImpl attributes)
          Receives notification of the empty element.
 void endElement(String name)
          Receives notification of the end of an element.
 void endFragment()
          Receives notification of the end of a fragment.
 void pcdata(String pcdata)
          Receives notification of parseable character data.
 void pi(String target, AttributesImpl attributes)
          Receives notification of a processing instruction.
 void startElement(String name, AttributesImpl attributes)
          Receives notification of the beginning of an element.
 void startFragment()
          Receives notification of the beginning of a fragment.
 void xmlDeclaration(String target, AttributesImpl attributes)
          Receives notification of the XML declaration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultXMLFragmentHandler

public DefaultXMLFragmentHandler()
Method Detail

xmlDeclaration

public void xmlDeclaration(String target,
                           AttributesImpl attributes)
Description copied from interface: XMLFragmentHandler
Receives notification of the XML declaration.

Specified by:
xmlDeclaration in interface XMLFragmentHandler
Parameters:
target - xml or XML
attributes - all additional information for this declaration (as version, encoding) put into attribtues as name/value pairs

doctype

public void doctype(String rootElement,
                    String pubId,
                    String sysId,
                    String internalDTD)
Description copied from interface: XMLFragmentHandler
Receives notification of the document type declaration of the XML document.

Specified by:
doctype in interface XMLFragmentHandler
Parameters:
rootElement - the root element of the XML document
pubId - the public id of the DTD or null if there is none
sysId - the system id of the DTD or null if there is none
internalDTD - the internal DTD or null if there is none; it will be notified as a single completely unparsed text block

startFragment

public void startFragment()
Description copied from interface: XMLFragmentHandler
Receives notification of the beginning of a fragment. This method will be called exactly once per parse and before any other call back.

Specified by:
startFragment in interface XMLFragmentHandler

endFragment

public void endFragment()
Description copied from interface: XMLFragmentHandler
Receives notification of the end of a fragment. This method will be called exactly once per parse and no other call back will follow this one.

Specified by:
endFragment in interface XMLFragmentHandler

startElement

public void startElement(String name,
                         AttributesImpl attributes)
Description copied from interface: XMLFragmentHandler
Receives notification of the beginning of an element.

Specified by:
startElement in interface XMLFragmentHandler
Parameters:
name - the full name of this element
attributes - the attributes associated with this element
See Also:
XMLFragmentHandler.emptyElement(java.lang.String, org.xml.sax.helpers.AttributesImpl), XMLFragmentHandler.endElement(java.lang.String)

emptyElement

public void emptyElement(String name,
                         AttributesImpl attributes)
Description copied from interface: XMLFragmentHandler
Receives notification of the empty element. No end tag notification will follow this one as it is empty.

This notification will only be thrown if the tag in the XML document was really written in short form. I.e. <empty/> will create this notification while <empty></empty> will call XMLFragmentHandler.startElement(java.lang.String, org.xml.sax.helpers.AttributesImpl) followed XMLFragmentHandler.endElement(java.lang.String).

Specified by:
emptyElement in interface XMLFragmentHandler
Parameters:
name - the full name of this element
attributes - the attributes associated with this element
See Also:
XMLFragmentHandler.startElement(java.lang.String, org.xml.sax.helpers.AttributesImpl), XMLFragmentHandler.endElement(java.lang.String)

endElement

public void endElement(String name)
Description copied from interface: XMLFragmentHandler
Receives notification of the end of an element. This notification will not be thrown when an element has been notified by XMLFragmentHandler.emptyElement(java.lang.String, org.xml.sax.helpers.AttributesImpl) before.

Specified by:
endElement in interface XMLFragmentHandler
Parameters:
name - the full name of this element
See Also:
XMLFragmentHandler.emptyElement(java.lang.String, org.xml.sax.helpers.AttributesImpl), XMLFragmentHandler.startElement(java.lang.String, org.xml.sax.helpers.AttributesImpl)

pcdata

public void pcdata(String pcdata)
Description copied from interface: XMLFragmentHandler
Receives notification of parseable character data. As XMLFragmentParser has no means to identify ignorable whitespace, it will be notified here as well.

Specified by:
pcdata in interface XMLFragmentHandler
Parameters:
pcdata - parseable character data from XML document

cdata

public void cdata(String cdata)
Description copied from interface: XMLFragmentHandler
Receives notification of character data. This data may contain characters that need to be encoded to be parseable. Usually this notification is thrown upon occurence of a CDATA section.

Specified by:
cdata in interface XMLFragmentHandler

pi

public void pi(String target,
               AttributesImpl attributes)
Description copied from interface: XMLFragmentHandler
Receives notification of a processing instruction.

Specified by:
pi in interface XMLFragmentHandler
Parameters:
target - identifies the application or purpose this PI is for
attributes - all additional information for this PI put into attribtues as name/value pairs

comment

public void comment(String comment)
Description copied from interface: XMLFragmentHandler
Receives notification of a comment.

Specified by:
comment in interface XMLFragmentHandler
Parameters:
comment - the text of the comment


Copyright © 1999-2003 Oliver Zeigermann. All Rights Reserved.