org.knime.core.data.xml.io
Class XMLXpathCellReader

java.lang.Object
  extended by org.knime.core.data.xml.io.XMLXpathCellReader
All Implemented Interfaces:
XMLCellReader

public class XMLXpathCellReader
extends Object
implements XMLCellReader

Read nodes from XML source which match an XPath expression. Note, that the XPath syntax is very limited. Absolute path to nodes and the |-Operator is supported, only.

Author:
Heiko Hofer

Constructor Summary
XMLXpathCellReader(InputStream is, LimitedXPathMatcher xpathMatcher)
          Create a new instance.
 
Method Summary
 void close()
          Closes any resources need for the read process.
 XMLValue readXML()
          Reads the next XML @link{DataCell}.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLXpathCellReader

public XMLXpathCellReader(InputStream is,
                          LimitedXPathMatcher xpathMatcher)
                   throws ParserConfigurationException,
                          XMLStreamException
Create a new instance.

Parameters:
is - the xml source
xpathMatcher - nodes of the input that match will be read, only
Throws:
ParserConfigurationException
XMLStreamException
Method Detail

readXML

public XMLValue readXML()
                 throws IOException
Reads the next XML @link{DataCell}.

Specified by:
readXML in interface XMLCellReader
Returns:
The next @link{DataCell} or null when there is nothing to read. Note that this data cell implements @link{XMLValue}.
Throws:
IOException - If an error occurred during the read process.

close

public void close()
           throws IOException
Closes any resources need for the read process.

Specified by:
close in interface XMLCellReader
Throws:
IOException - If an error occurred.


Copyright, 2003 - 2012. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.