afreechart/src/main/java/org/afree/data/xml/DatasetReader.java
/**
     * Reads a {@link CategoryDataset} from a stream.
     *
     * @param in  the stream.
     *
     * @return A dataset.
     *
     * @throws IOException if there is a problem reading the file.
     */
Reads a  CategoryDataset from a stream.
@param in  the stream.

@return A dataset.

@throws IOException if there is a problem reading the file.
Reads a CategoryDataset from a stream . @param in the stream . @return A dataset . @throws IOException if there is a problem reading the file .
public static CategoryDataset readCategoryDatasetFromXML(InputStream in)
        throws IOException {
        CategoryDataset result = null;
        SAXParserFactory factory = SAXParserFactory.newInstance();
        try {
            SAXParser parser = factory.newSAXParser();
            CategoryDatasetHandler handler = new CategoryDatasetHandler();
            parser.parse(in, handler);
            result = handler.getDataset();
        }
        catch (SAXException e) {
            System.out.println(e.getMessage());
        }
        catch (ParserConfigurationException e2) {
            System.out.println(e2.getMessage());
        }
        return result;
    }
public static CategoryDataset readCategoryDatasetFromXML ( InputStream in ) throws IOException { CategoryDataset result = null ; SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; try { SAXParser parser = factory . newSAXParser ( ) ; CategoryDatasetHandler handler = new CategoryDatasetHandler ( ) ; parser . parse ( in , handler ) ; result = handler . getDataset ( ) ; } catch ( SAXException e ) { System . out . println ( e . getMessage ( ) ) ; } catch ( ParserConfigurationException e2 ) { System . out . println ( e2 . getMessage ( ) ) ; } return result ; }
Reads a {@link CategoryDataset} from a stream.
Reads a { @link CategoryDataset } from a stream .