src/main/java/org/jboss/loom/utils/XmlUtils.java
public static <T> List<T> readXmlConfigFileMulti( boolean must, File file, String xpath, Class<T> cls, String confAreaDesc ) throws MigrationException{
        if( ! file.exists() ){
            if( must )  throw new MigrationException("File to unmarshall not found: " + file);
            else        return null;
        }
            
        try {
            return XmlUtils.unmarshallBeans( file, xpath, cls );
        } catch( Exception ex ) {
            throw new MigrationException("Failed loading "+confAreaDesc+" config from "+file.getPath()+":\n    " + ex.getMessage(), ex);
        }
    }
/**
     *  Reads given XML file, finds all nodes matching given XPath, and reads them into a list using given JAXB class.
     *  @param confAreaDesc  Used for exception message.
     *  @throws MigrationException wrapping any Exception.
     */
Reads given XML file, finds all nodes matching given XPath, and reads them into a list using given JAXB class.
@param confAreaDesc  Used for exception message.
@throws MigrationException wrapping any Exception.
Reads given XML file finds all nodes matching given XPath and reads them into a list using given JAXB class . @param confAreaDesc Used for exception message . @throws MigrationException wrapping any Exception .
public static <T> List<T> readXmlConfigFileMulti( boolean must, File file, String xpath, Class<T> cls, String confAreaDesc ) throws MigrationException{
        if( ! file.exists() ){
            if( must )  throw new MigrationException("File to unmarshall not found: " + file);
            else        return null;
        }
        try {
            return XmlUtils.unmarshallBeans( file, xpath, cls );
        } catch( Exception ex ) {
            throw new MigrationException("Failed loading "+confAreaDesc+" config from "+file.getPath()+":\n    " + ex.getMessage(), ex);
        }
    }
public static < T > List < T > readXmlConfigFileMulti ( boolean must , File file , String xpath , Class < T > cls , String confAreaDesc ) throws MigrationException { if ( ! file . exists ( ) ) { if ( must ) throw new MigrationException ( "File to unmarshall not found: " + file ) ; else return null ; } try { return XmlUtils . unmarshallBeans ( file , xpath , cls ) ; } catch ( Exception ex ) { throw new MigrationException ( "Failed loading " + confAreaDesc + " config from " + file . getPath ( ) + ":\n    " + ex . getMessage ( ) , ex ) ; } }
Reads given XML file, finds all nodes matching given XPath, and reads them into a list using given JAXB class.
Reads given XML file finds all nodes matching given XPath and reads them into a list using given JAXB class .