Mercurial > hg > digilib-old
comparison servlet/src/digilib/io/XMLListLoader.java @ 176:67ff8c7fecb9
Servlet version 1.17b2
- new mapping file for "virtual directories"
- direct file URLs now work without extension (even with wrong ones)
| author | robcast |
|---|---|
| date | Mon, 10 Nov 2003 20:59:00 +0100 |
| parents | c878ea574c29 |
| children | afe7ff98bb71 |
comparison
equal
deleted
inserted
replaced
| 175:633947100c86 | 176:67ff8c7fecb9 |
|---|---|
| 32 import org.xml.sax.Attributes; | 32 import org.xml.sax.Attributes; |
| 33 import org.xml.sax.SAXException; | 33 import org.xml.sax.SAXException; |
| 34 import org.xml.sax.SAXParseException; | 34 import org.xml.sax.SAXParseException; |
| 35 import org.xml.sax.helpers.DefaultHandler; | 35 import org.xml.sax.helpers.DefaultHandler; |
| 36 | 36 |
| 37 /** Loads a simple XML list into a HashMap. | |
| 38 * | |
| 39 * The XML file has an outer <code>list_tag</code>. Every entry is an | |
| 40 * <code>entry_tag</code> with two attributes: the <code>key_att</code> | |
| 41 * key and the <code>value_att</code> value. | |
| 42 * | |
| 43 * The file is read by the <code>loadURL</code> method, that returns a | |
| 44 * HashMap with the key-value pairs. | |
| 45 * | |
| 46 * @author casties | |
| 47 */ | |
| 37 public class XMLListLoader { | 48 public class XMLListLoader { |
| 38 | 49 |
| 39 private String listTag = "list"; | 50 private String listTag = "list"; |
| 40 private String entryTag = "entry"; | 51 private String entryTag = "entry"; |
| 41 private String keyAtt = "key"; | 52 private String keyAtt = "key"; |
