Does anyone have a simple example of reading a MARC file using the Java
marc4j library? The documentation is rather lackluster (
http://marc4j.tigris.org/doc/) and I am unable to find anything helpful
Googling or searching discussion lists. I am wanting to do something like
this:
public class MARCParser(){
public ArrayList<String> getData(File file){
MarcReader reader = new MarcReader(file);
ArrayList<String> data = new ArrayList<>;
while(reader.next()){
data.add(reader.getField(“856”));
}
return data;
}
}
I figured this would be a simple enough task and have done something very
similar with a PHP MARC library, but I am stumped here.
Josh Welker
Information Technology Librarian
James C. Kirkpatrick Library
University of Central Missouri
Warrensburg, MO 64093
JCKL 2260
660.543.8022
|