Class XmlMarcWriter
- java.lang.Object
-
- org.marc4j.util.XmlMarcWriter
-
public class XmlMarcWriter extends Object
Provides a driver for
MarcXmlHandler
to convert MARCXML to MARC tape format (ISO 2709) either by providing a MARCXML document or by pre-processing a different XML format by using an XSLT stylesheet that outputs a well-formed MARCXML document.For usage, run from the command-line with the following command:
java org.marc4j.util.XmlMarcWriter -usage
A note about character encodings:
If no output encoding is specified on the command-line the default charset is used. To specify an output encoding use a charset name supported by your Java virtual machine. For input MARC4J relies on the encoding in the XML declaration and the underlying SAX2 XML parser implementation. The following command-line example converts UTF-8 to ANSEL:java org.marc4j.util.XmlMarcWriter -convert ANSEL -oe ISO8859_1 -out output.mrc input.xml
Note: the Latin-1 encoding (ISO8859_1) is used since ANSEL is not a supported character encoding.
Note: this class requires a JAXP compliant SAX2 parser. For W3C XML Schema support a JAXP 1.2 compliant parser is needed.
Check the home page for MARCXML for more information about the MARCXML format.
- Author:
- Bas Peters
- See Also:
MarcXmlHandler
,MarcWriter
,Converter
-
-
Constructor Summary
Constructors Constructor Description XmlMarcWriter()
-
-
-
Method Detail
-
main
public static void main(String[] args)
-
-