public interface XMLHandlerInterface
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 lidosXMLException - se houver algum problema no processamentovoid 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 processamentovoid 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 DTDInputSource 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()
XMLElementFactoryInterfacevoid endDocument()
throws XMLException
XMLExceptionvoid endDocument(XMLElementInterface rootElement)
rootElement - raiz do XMLvoid warning(XMLException e) throws XMLException
e - - exceçãoXMLException - se a exceção precisar ser relançadavoid fatalError(XMLException e) throws XMLException
e - - exceçãoXMLException - se a exceção precisar ser relançadavoid error(XMLException e) throws XMLException
e - - exceçãoXMLException - se a exceção precisar ser relançadaorg.xml.sax.helpers.DefaultHandler getSAXInternalHandler()
Copyright © 2016 Tecgraf/PUC-Rio. All rights reserved.