Package digilib.util
Class XMLMapListLoader
java.lang.Object
digilib.util.XMLMapListLoader
Loads a simple XML structure into a List of Maps.
The XML file has an outer
list_tag
. Every entry is an
entry_tag
. All attributes are loaded into a Map.
Nested tags are not supported. The text
content of the tag is put in the Map under the key "_text".
The file is read by the loadURI()
method, that returns a List with
Maps of key-value pairs.- Author:
- casties
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXMLMapListLoader
(String list_tag, String entry_tag) Creates an XMLMapListLoader with an outerlist_tag
. -
Method Summary
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
CONTENT_KEY
-
-
Constructor Details
-
XMLMapListLoader
public XMLMapListLoader() -
XMLMapListLoader
Creates an XMLMapListLoader with an outerlist_tag
. Every entry is anentry_tag
. All attributes are stored in a Map.- Parameters:
list_tag
- the list tagentry_tag
- the entry tag
-
-
Method Details
-
loadUri
Load and parse a file (as URL). returns List of Maps with data.- Parameters:
uri
- the URI- Returns:
- the Map
- Throws:
SAXException
- on errorIOException
- on error
-