Hi,
I wants to know how specify a ContentHandler in my SaxParser
the source's begining is :
SaxParser (String p_szUri,String p_szContentHandler) {
try {
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser"
;
l_szResult = ""; //my result to print in a TextArea
parser.setContentHandler(this);
parser.parse(p_szUri);
}
...
Instead of this (my parser fonctions are at the bottom of this file) in parser.setContentHandler(this); I needs to specify another file.
The solution is an interface which works, but it's a little complex and I thinks there's a fonction to cast the path of a handler for the .setContentHandler()
Excuse me for my poor english, but can you indicate if the interface is the only solution or not.
Thx
Sebastien
I wants to know how specify a ContentHandler in my SaxParser
the source's begining is :
SaxParser (String p_szUri,String p_szContentHandler) {
try {
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser"
l_szResult = ""; //my result to print in a TextArea
parser.setContentHandler(this);
parser.parse(p_szUri);
}
...
Instead of this (my parser fonctions are at the bottom of this file) in parser.setContentHandler(this); I needs to specify another file.
The solution is an interface which works, but it's a little complex and I thinks there's a fonction to cast the path of a handler for the .setContentHandler()
Excuse me for my poor english, but can you indicate if the interface is the only solution or not.
Thx
Sebastien