public static void main(String args[]) throws Exception {
InputStream input = ReadMarcExample.class
.getResourceAsStream("resources/summerland.mrc");
MarcReader reader = new MarcStreamReader(input);
String stylesheetUrl = "http://www.loc.gov/standards/mods/v3/MARC21slim2MODS3.xsl";
Source stylesheet = new StreamSource(stylesheetUrl);
DOMResult result = new DOMResult();
MarcXmlWriter writer = new MarcXmlWriter(result, stylesheet);
writer.setConverter(new AnselToUnicode());
while (reader.hasNext()) {
Record record = (Record) reader.next();
writer.write(record);
}
writer.close();
Document doc = (Document) result.getNode();