When field trimming is enabled, , all validations are performed after the field's text has first been trimmed.
Field validations are ignored when writing to an output stream.
Revision 6, © 2010-2013 Kevin Seim Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
so that the XML document can be properly completed.
For this reason, when unmarshalling untrusted sources, it is recommended that you read the stream twice, using the first pass to validate the integrity of the file including syntax, record identification, record ordering, possible header/trailer counts, etc.
For example, the following mapping file might be used to validate our orders file. This section provides further details for using Bean IO to marshall and unmarshall Java objects to and from XML formatted streams.
Record level error messages are retrieved using the following prioritized list of keys.
If a message is not configured under the name of the first key, the next key will be tried until a message is found, or a default message is used.