Skip to content

pseudochaos/xpom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

XPom (XPath to Object Mapping)

XPom performs mapping of various xml documents to POJOs using simple annotations with XPaths.

It supports seamless, out-of-the-box data type conversion of:

  • fields with primitive types: byte, short, int, long, float, double, boolean, char.
  • fields with wrapped types: Byte, Short, Integer, Long, Float, Double, Boolean, Character.
  • fields containing enumerations
  • fields containing Simple Data Objects like Numbers and Strings.
  • fields containing arrays of primitive types.
  • fields containing arrays of wrapped types.
  • fields containing arrays of Simple Data Objects and enumerations
  • fields containing collections of Simple Data Objects

Exception handling strategies levels (down-to-top):

  • JVM Level - can be overridden by setting a value on XPomFactory
  • Class Level - can be overridden by setting a value on a particular class mapper
  • Field Level - can be overridden by setting a value for a particular field on a particular class mapper (not recommended)

Default exception handling strategy - to FAIL always. Predefined strategies:

  • FAIL - Throws an exception if either value isn't present in the xml or conversion failed for mandatory fields
  • USE_DEFAULT - Uses either java default value or user's defined default value when value isn't present or conversion exception occurs

About

XPom (XPath to Object Mapper)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages