Class JavaBeanReader


public class JavaBeanReader extends XmlReader
Obtains records from an object using bean introspection and reflection. See the Read from Java beans example.

JavaBeanReader's XmlReader.addField(String, String), XmlReader.addField(String, String, boolean), and XmlReader.addRecordBreak(String) methods use a subset of the XPath 1.0 location paths notation to identify field values and demarcate records.

Axis Specifiers

Axis Abbreviated Syntax Supported Examples
ancestor      
ancestor-or-self      
attribute @   @lang or attribute::lang
child   yes title or child::title
descendant   yes  
descendant-or-self // yes //book or /descendant-or-self::book/
following      
following-sibling      
namespace      
parent ..    
preceding      
preceding-sibling      
self . yes  

Node Tests

  • comment(), text(), processing-instruction(), and node() are not supported

Predicates

  • None supported

Functions and Operators

  • None supported
  • Constructor Details

    • JavaBeanReader

      public JavaBeanReader(String name, Object javabean)
      Creates a reader over the given object graph, using name as the root element name in location paths.