BeanIO 1.2.3

org.beanio.parser.xml
Class XmlRecord

java.lang.Object
  extended by org.beanio.parser.Record
      extended by org.beanio.parser.xml.XmlRecord

public class XmlRecord
extends Record

Record used for parsing XML input streams. A XML record is represented by a document object model (DOM).

Since:
1.1
Author:
Kevin Seim

Constructor Summary
XmlRecord()
          Constructs a new XmlRecord.
 
Method Summary
 void clear()
          Clears the current state of the record before the next record is read.
 Document getDocument()
          Returns the XML document object model (DOM) for the current record.
 Node getPosition()
          Returns the parent node currently being parsed in the DOM tree.
 Element getPreviousElement()
          Returns the last parsed DOM element for a field or bean collection.
 void popField()
          Pops the last field from the stack.
 void pushField()
          Pushes a field onto the stack.
 void setPosition(Node position)
          Sets the parent node currently being parsed in the DOM tree.
 void setPreviousElement(Element e)
          Sets the last parsed DOM element for a field or bean collection.
 void setValue(Object value)
          Sets the value of the record as returned from the RecordReader
 
Methods inherited from class org.beanio.parser.Record
addFieldError, addFieldErrorMessage, addRecordError, addRecordErrorMessage, getContext, getFieldOffset, getFieldOffsets, getFieldText, getFieldText, getLocale, getRecordLineNumber, getRecordName, getRecordText, hasFieldErrors, hasFieldErrors, hasRecordErrors, setFieldOffset, setFieldText, setLineNumber, setLocale, setMessageContext, setRecordName, setRecordText, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlRecord

public XmlRecord()
Constructs a new XmlRecord.

Method Detail

clear

public void clear()
Description copied from class: Record
Clears the current state of the record before the next record is read.

Overrides:
clear in class Record

setValue

public void setValue(Object value)
Description copied from class: Record
Sets the value of the record as returned from the RecordReader

Overrides:
setValue in class Record
Parameters:
value - the record value read by a record reader
See Also:
RecordReader

pushField

public void pushField()
Description copied from class: Record
Pushes a field onto the stack.

Overrides:
pushField in class Record

popField

public void popField()
Description copied from class: Record
Pops the last field from the stack.

Overrides:
popField in class Record

getPreviousElement

public Element getPreviousElement()
Returns the last parsed DOM element for a field or bean collection.

Returns:
the last parsed element

setPreviousElement

public void setPreviousElement(Element e)
Sets the last parsed DOM element for a field or bean collection.

Parameters:
e - the last parsed element

getDocument

public Document getDocument()
Returns the XML document object model (DOM) for the current record.

Returns:
the XML document object model

getPosition

public Node getPosition()
Returns the parent node currently being parsed in the DOM tree.

Returns:
the current parent DOM node

setPosition

public void setPosition(Node position)
Sets the parent node currently being parsed in the DOM tree.

Parameters:
position - the current parent DOM node

BeanIO 1.2.3

Copyright © 2010-2012 Kevin Seim