views:

9

answers:

1

I need to parse an UTF-8 encoded input stream, so I think the most appropriate method is to use

    XMLReader reader = new ExpatReader();
    InputSource source = new InputSource(in);
    source.setEncoding(encoding.expatName);
    reader.parse(source);

For that I need to import org.apache.harmony.xml.ExpatReader but I cannot figure out how, I mean which Java package must I install from http://harmony.apache.org/download.cgi?

Or is there an alternative method to accomplish the same goal?

Thank you for helping.

A: 

you don't instantiate an expat reader directly. just use the XMLReaderFactory.

Elliott Hughes