marc4j/marc4j — pull request #29 by sesuncedu (2013-03-03 00:52:20+00:00)
Title: Add some checks for record with missing idicators (read and write).

This is a partial fix related to reading or writing records with no indicator set.

Indicators are mandatory for DataField - NPE's were being thrown because no checks were being made. I didn't add checks for missing values everywhere.

Writes have a different problem; unset indicators default to \0 ; this was being 'XML escaped' as a bogus character entity- unfortunately, the character entity expands to \0 , which is invalid XML, so there isn't much point in delaying the inevitable.

This sort of thing is going on all over the shop; the whole XML code is a bit wonky.

I just added a method to check for Well formedness to MarcFactory (non abstract); it just returns true or false.