de.zeigermann.xml.simpleImporter
Interface SimpleImportHandler
- DefaultSimpleImportHandler
public interface SimpleImportHandler
void | cData(SimplePath path, String cdata) - Is called back when the parser has found character data.
|
void | endDocument() - Is called back when the parsed document ends.
|
void | endElement(SimplePath path, String name) - Is called back when the parser has found the end of an element.
|
void | startDocument() - Is called back when the parsed document begins.
|
void | startElement(SimplePath path, String name, AttributesImpl attributes, String leadingCDdata) - Is called back when the parser has found the start of an element.
|
cData
public void cData(SimplePath path,
String cdata)
Is called back when the parser has found character data.
Caution:
This method will not be called when
SimpleImporter#setIncludeLeadingCDataIntoStartElementCallback(boolean)
is enabled. In this case character data will
be passed over together with
startElement(SimplePath,String,AttributesImpl,String)
.
Unlike the character method in the SAX interface this callback guarantees
maximum length chunks of character data. This means, on a contiguous text
block, i.e. text not intermitted by tagging, you will get exactly one
callback.
endDocument
public void endDocument()
Is called back when the parsed document ends.
endElement
public void endElement(SimplePath path,
String name)
Is called back when the parser has found the end of an element.
path
- path of the element closed by this end tagname
- the name of the element to be closed
startDocument
public void startDocument()
Is called back when the parsed document begins.
startElement
public void startElement(SimplePath path,
String name,
AttributesImpl attributes,
String leadingCDdata)
Is called back when the parser has found the start of an element.
This callback is especially convenient when your data does not have
mixed content, i.e. the mixture of CDATA and tagging in one element
level. When this is the case you will always get the whole text content
together with this callback in the
leadingCDdata
parameter.
Unlike from
cData(SimplePath,String)
callback all character data fragments will
be grouped together in this parameter.
If you have to deal with mixed content you can still leave this feature
enabled, but you will have to be aware of the fact that you will then
get some character data via this callback and other via the
cData(SimplePath,String)
callback.
Copyright B) 2002-2004 Oliver Zeigermann. All Rights Reserved.