Hi, Thanks :) I could get it done using the underlying parser.
Kalani On Tue, Jul 29, 2008 at 6:57 PM, Ajith Ranabahu <[EMAIL PROTECTED]>wrote: > See the javadoc for getElementText in > XMLStreamReader.(https://stax-utils.dev.java.net/nonav/javadoc/api/) > This does not do what you want. However you can easily modify this > piece of code to skip the start elements and perhaps keep a depth > indicator to find the correct end element. > > > On Fri, Jul 25, 2008 at 8:14 AM, Kalani Ruwanpathirana > <[EMAIL PROTECTED]> wrote: > > Hi all > > > > I want to retrieve all the text inside elements in an XML document. In > > simple terms I need to get all the text nodes. A clear approach will be > to > > iterate through the entire tree and get text nodes. Other than this is > there > > any efficient way to do this (possibly using the underlying StAX parser)? > >> > >> > > Thanks in advance > > Kalani > > > > -- > > Kalani Ruwanpathirana > > Department of Computer Science & Engineering > > University of Moratuwa > > > > > > -- > Ajith Ranabahu > > Reading, after a certain age, diverts the mind too much from its > creative pursuits. Any man who reads too much and uses his own brain > too little falls into lazy habits of thinking - Albert Einstein > -- Kalani Ruwanpathirana Department of Computer Science & Engineering University of Moratuwa
