mev-4.0.01/source/org/tigr/remote/protocol/parser/ParserUtil.java

Code
Comments
Other
Rev Date Author Line
2 26 Feb 07 jari 1 /*
2 26 Feb 07 jari 2 Copyright @ 1999-2003, The Institute for Genomic Research (TIGR).
2 26 Feb 07 jari 3 All rights reserved.
2 26 Feb 07 jari 4 */
2 26 Feb 07 jari 5 /*
2 26 Feb 07 jari 6  * $RCSfile: ParserUtil.java,v $
2 26 Feb 07 jari 7  * $Revision: 1.4 $
2 26 Feb 07 jari 8  * $Date: 2006/02/23 21:00:02 $
2 26 Feb 07 jari 9  * $Author: caliente $
2 26 Feb 07 jari 10  * $State: Exp $
2 26 Feb 07 jari 11  */
2 26 Feb 07 jari 12 package org.tigr.remote.protocol.parser;
2 26 Feb 07 jari 13
2 26 Feb 07 jari 14 import org.tigr.util.ConfMap;
2 26 Feb 07 jari 15 import org.xml.sax.SAXException;
2 26 Feb 07 jari 16 import org.xml.sax.XMLReader;
2 26 Feb 07 jari 17 import org.xml.sax.helpers.XMLReaderFactory;
2 26 Feb 07 jari 18
2 26 Feb 07 jari 19 class ParserUtil {
2 26 Feb 07 jari 20     /**
2 26 Feb 07 jari 21      * Creates a xml reader by specified configuration.
2 26 Feb 07 jari 22      */
2 26 Feb 07 jari 23     public static XMLReader createReader( ConfMap cfg ) throws SAXException {
2 26 Feb 07 jari 24         String driver = cfg.getProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser" );
2 26 Feb 07 jari 25         return XMLReaderFactory.createXMLReader( driver );
2 26 Feb 07 jari 26     }
2 26 Feb 07 jari 27 }
2 26 Feb 07 jari 28