I think that should work too.
But for convenient I just copy the whole class to my .java file (for the parser default handler), and import relevant classes. Important you mustn’t use import com.google.appinventor.components.runtime.util.*;, cuz the non-exist XmlParser.java is in that class.
I’ve forget what error is that it was only one error in the main file and not in the XML parser file.i think my problem is that I didn’t extend the xml parser file from my main file.