PDA

View Full Version : string Parser


vibhor80
11-16-2007, 04:05 AM
I have write down one code. In this code string like XML.
For EX.

Query = <Q><F>A1</F><S>*</S><OR><Ex><L>x</L><o>=</o><R>10</R></Ex><Ex><L>y</L><o>=</o><R>20</R></Ex></OR></Q>

I want to extract all data.

Output is like this : A1, * , x = 10, y = 20

Pls give some code snippets.

shyam
11-16-2007, 10:53 AM
org.w3c.dom.NodeList textList = org.apache.xpath.XPathAPI.selecNodeList(rootNode, "//*/text()");