|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLStreamHandler
Callback interface similar to ContentHandler
that allows for an
efficient serialization of hierarchical markup. The main advantage over the
ContentHandler
is that the attribute declarations can be streamed and
do not need to be prepared as strings.
Field Summary | |
---|---|
static java.lang.String |
ATTR_TYPE_CDATA
|
static java.lang.String |
ATTR_TYPE_ENTITIES
|
static java.lang.String |
ATTR_TYPE_ENTITY
|
static java.lang.String |
ATTR_TYPE_ID
|
static java.lang.String |
ATTR_TYPE_IDREF
|
static java.lang.String |
ATTR_TYPE_IDREFS
|
static java.lang.String |
ATTR_TYPE_NMTOKEN
|
static java.lang.String |
ATTR_TYPE_NMTOKENS
|
static java.lang.String |
ATTR_TYPE_NOTATION
|
Method Summary | |
---|---|
void |
characters(char[] cbuf,
int off,
int len)
Writes characters, depending on the enclosing element this is either the value of an attribute or the character data of an element. |
void |
characters(java.lang.String cbuf,
int off,
int len)
Writes characters, depending on the enclosing element this is either the value of an attribute or the character data of an element. |
void |
endAttribute()
Ends the serialization of an attribute |
void |
endDocument()
Indicates the end of the serialization process |
void |
endElement()
Ends the previously opened element |
void |
startAttribute(java.lang.String qName,
java.lang.String type)
Starts an attribute, namespace declarations need to be represented as attributes |
void |
startDocument()
Indicates the beginning of the serialization process |
void |
startElement(java.lang.String qName)
Starts an element |
Field Detail |
---|
static final java.lang.String ATTR_TYPE_CDATA
Constants.ATTR_TYPE_CDATA
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_ID
Constants.ATTR_TYPE_ID
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_IDREF
Constants.ATTR_TYPE_IDREF
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_IDREFS
Constants.ATTR_TYPE_IDREFS
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_NMTOKEN
Constants.ATTR_TYPE_NMTOKEN
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_NMTOKENS
Constants.ATTR_TYPE_NMTOKENS
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_ENTITY
Constants.ATTR_TYPE_ENTITY
,
Constant Field Valuesstatic final java.lang.String ATTR_TYPE_ENTITIES
static final java.lang.String ATTR_TYPE_NOTATION
Constants.ATTR_TYPE_NOTATION
,
Constant Field ValuesMethod Detail |
---|
void characters(char[] cbuf, int off, int len) throws java.io.IOException
cbuf
- the character bufferoff
- first index into the bufferlen
- length of the data in the buffer
java.io.IOException
void characters(java.lang.String cbuf, int off, int len) throws java.io.IOException
cbuf
- the stringoff
- first index into the bufferlen
- length of the data in the buffer
java.io.IOException
void endAttribute() throws java.io.IOException
java.io.IOException
void endDocument() throws java.io.IOException
java.io.IOException
void endElement() throws java.io.IOException
java.io.IOException
void startAttribute(java.lang.String qName, java.lang.String type) throws java.io.IOException
qName
- the qname of the attributetype
- the type of the attribute if known, else null
.
The selection of the correct attribute type has performance
implications since a more efficient serializer can be used for
non CDATA types.
java.io.IOException
#ATTR_TYPE_CDATA}
,
#ATTR_TYPE_ID}
,
#ATTR_TYPE_IDREF}
,
#ATTR_TYPE_IDREFS}
,
#ATTR_TYPE_NMTOKEN}
,
#ATTR_TYPE_NMTOKENS}
,
#ATTR_TYPE_ENTITY}
,
#ATTR_TYPE_ENTITIES}
,
#ATTR_TYPE_NOTATION}
void startDocument() throws java.io.IOException
java.io.IOException
void startElement(java.lang.String qName) throws java.io.IOException
qName
- the qname of the element, namespace handling must be done
explicitly
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |