|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XMLHandlerInterface
Interface para os handlers de eventos usados pelo parser. Define o conjunto de operações que devem ser implementadas pelo handler definido pela aplicação.
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Evento de leitura de caracteres (CDATA). |
void |
endDocument()
Callback executada ao final do processamento do documento. |
void |
endDocument(XMLElementInterface rootElement)
Callback executada ao final do processamento do documento. |
void |
endElement(String uri,
String localName,
String qName)
Evento de tag de fechamento de um elemento. |
void |
error(XMLException e)
Evento associado a um erro. |
void |
fatalError(XMLException e)
Evento associado a um erro fatal. |
String |
getDTD()
Retorna o DTD associado ao documento. |
InputSource |
getInputSource()
Retorna o inputSource associado ao handler. |
XMLElementInterface |
getRootElement()
Retorna o elemento-raiz do documento |
org.xml.sax.helpers.DefaultHandler |
getSAXInternalHandler()
Retorna o handler interno (SAX) usado por este handler. |
XMLElementFactoryInterface |
getXMLFactory()
Retorna a fábrica de elementos XML associada ao handler. |
InputSource |
resolveEntity(String publicId,
String systemId)
Callback que permite à aplicação resolver "entidades externas". |
void |
setDTD(String dtd)
Define o DTD associado ao elemento. |
void |
setInputSource(Reader input)
Define o inputSource do handler a partir de um InputStream,
usando um determinado encoding. |
void |
startElement(String uri,
String localName,
String qName,
List<XMLAttribute> attributes)
Evento de nova tag. |
void |
warning(XMLException e)
Evento associado a um warning. |
| Method Detail |
|---|
XMLElementInterface getRootElement()
void characters(char[] ch,
int start,
int length)
throws XMLException
ch - array de caracteres contendo os caracteres lidosstart - início dos caracteres lidos no arraylength - número de caracteres lidos
XMLException - se houver algum problema no processamento
void startElement(String uri,
String localName,
String qName,
List<XMLAttribute> attributes)
throws XMLException
uri - .localName - .qName - .attributes - lista de objetos do tipo XMLAttribute.
XMLException - caso tenha havido algum problema no processamento
void endElement(String uri,
String localName,
String qName)
throws XMLException
uri - .localName - .qName - .
XMLException - caso tenha havido algum problema no processamentovoid setInputSource(Reader input)
InputStream,
usando um determinado encoding.
input - stream de entradaInputSource getInputSource()
inputSource associado ao handler.
inputSource associado ao handler.String getDTD()
void setDTD(String dtd)
dtd - o DTD
InputSource resolveEntity(String publicId,
String systemId)
throws XMLException
systemId)
publicId - - o "identificador público", ou null se nenhum tiver sido
definido (normalmente, é null).systemId - - o system identifier como definido no documento
XML (p.ex. a URL do DTD)
InputSource para a entidade externa, ou null
indicando que o tratamento default deve ser aplicado.
XMLExceptionEntityResolver.resolveEntity(java.lang.String,
java.lang.String),
InputSourceXMLElementFactoryInterface getXMLFactory()
XMLElementFactoryInterface
void endDocument()
throws XMLException
XMLExceptionvoid endDocument(XMLElementInterface rootElement)
rootElement - raiz do XML
void warning(XMLException e)
throws XMLException
e - - exceção
XMLException - se a exceção precisar ser relançada
void fatalError(XMLException e)
throws XMLException
e - - exceção
XMLException - se a exceção precisar ser relançada
void error(XMLException e)
throws XMLException
e - - exceção
XMLException - se a exceção precisar ser relançadaorg.xml.sax.helpers.DefaultHandler getSAXInternalHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||