public static Map<URI, Set<URI>> readMapFromXML(final File inputFile) throws IOException {
        final Map<URI, Set<URI>> graph = new HashMap<>();
        if (!inputFile.exists()) {
            return Collections.emptyMap();
        }
        final Properties prop = new Properties();
        try (FileInputStream in = new FileInputStream(inputFile)) {
            prop.loadFromXML(in);
        } catch (final IOException e) {
            throw new IOException("Failed to read subject scheme graph: " + e.getMessage(), e);
        }

        for (final Map.Entry<Object, Object> entry: prop.entrySet()) {
            final String key = (String) entry.getKey();
            final String value = (String) entry.getValue();
            final Set<URI> r = new HashSet<>();
            for (final String v: StringUtils.restoreSet(value, COMMA)) {
                r.add(toURI(v));
            }
            graph.put(toURI(key), r);
        }

        return Collections.unmodifiableMap(graph);
    }
public static Map < URI , Set < URI > > readMapFromXML ( final File inputFile ) throws IOException { final Map < URI , Set < URI > > graph = new HashMap < > ( ) ; if ( ! inputFile . exists ( ) ) { return Collections . emptyMap ( ) ; } final Properties prop = new Properties ( ) ; try ( FileInputStream in = new FileInputStream ( inputFile ) ) { prop . loadFromXML ( in ) ; } catch ( final IOException e ) { throw new IOException ( "Failed to read subject scheme graph: " + e . getMessage ( ) , e ) ; } for ( final Map . Entry < Object , Object > entry : prop . entrySet ( ) ) { final String key = ( String ) entry . getKey ( ) ; final String value = ( String ) entry . getValue ( ) ; final Set < URI > r = new HashSet < > ( ) ; for ( final String v : StringUtils . restoreSet ( value , COMMA ) ) { r . add ( toURI ( v ) ) ; } graph . put ( toURI ( key ) , r ) ; } return Collections . unmodifiableMap ( graph ) ; }
Read a map from XML properties file. Values are split by {@link org.dita.dost.util.Constants#COMMA COMMA} into a set.

@param inputFile XML properties file absolute path