com.ximpleware
Class TextIter

java.lang.Object
  extended by com.ximpleware.TextIter

public class TextIter
extends Object

This class iterates through all text nodes of an element. VTDNav has getText() which is inadequate for mixed content style of XML. text nodes include character_data and CDATA. Since version 2.8, selectText(), selectComment(), and selectPI() were added Creation date: (12/5/03 5:53:41 PM)


Field Summary
protected  int depth
           
protected  int index
           
protected  VTDNav vn
           
 
Constructor Summary
TextIter()
          TextIter constructor comment.
 
Method Summary
 int getNext()
          Get the index vals for the text, PI name, or comment node in document order.
 void selectComment()
          Ask textIter to return comment nodes
 void selectNode()
           
 void selectPI0()
          Ask TextIter to return processing instruction name no value
 void selectPI1(String s)
           
 void selectText()
          Ask textIter to return character data or CDATA nodes
 void touch(VTDNav v)
          Obtain the current navigation position and element info from VTDNav.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

depth

protected int depth

index

protected int index

vn

protected VTDNav vn
Constructor Detail

TextIter

public TextIter()
TextIter constructor comment. Text type is selected by default

Method Detail

selectText

public void selectText()
Ask textIter to return character data or CDATA nodes


selectComment

public void selectComment()
Ask textIter to return comment nodes


selectPI0

public void selectPI0()
Ask TextIter to return processing instruction name no value


selectPI1

public void selectPI1(String s)

selectNode

public void selectNode()

getNext

public int getNext()
Get the index vals for the text, PI name, or comment node in document order. Creation date: (12/5/03 6:11:50 PM)

Returns:
int (-1 if no more left)

touch

public void touch(VTDNav v)
Obtain the current navigation position and element info from VTDNav. So one can instantiate it once and use it for many different elements Creation date: (12/5/03 6:20:44 PM)

Parameters:
v - com.ximpleware.VTDNav


Copyright © 2013. All Rights Reserved.