Something like:
String message = "<a><b>hi there</b></a>";
Reader reader = new StringReader(message);
DOMParser parser = new DOMParser();
parser.parse(new InputSource(reader));
Document document = parser.getDocument();
Node node = XPathAPI.selectSingleNode(document, "/a/b/text()");
if(node != null)
System.out.println(node.getNodeValue();
Java XML wrote:
>
> Hi Folks,
> How to get the value of a node or element using xpath api.
>
> <a>
> <b>hi there</b>
> </a>
>
> i want to get "hi there" here just a hint would do.
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com
--
____________________________________________________________
James Melton CyLogix
609.750.5190 609.750.5100
[EMAIL PROTECTED] www.cylogix.com