Package digilib.util

Class XMLMapLoader


  • public class XMLMapLoader
    extends Object
    Loads a simple XML list into a HashMap. The XML file has an outer list_tag. Every entry is an entry_tag with two attributes: the key_att key and the value_att value. The file is read by the loadURL method, that returns a HashMap with the key-value pairs.
    Author:
    casties
    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
    • Constructor Detail

      • XMLMapLoader

        public XMLMapLoader()
      • XMLMapLoader

        public XMLMapLoader​(String list_tag,
                            String entry_tag,
                            String key_att,
                            String value_att)
        Creates an XMLMapLoader with an outer list_tag. Every entry is an entry_tag with two attributes: the key_att key and the value_att value.
        Parameters:
        list_tag - the list tag
        entry_tag - the entry tag
        key_att - the key attribute
        value_att - the value attribute