Hi Imtiyaz,
 
This is more a Java/XML question than a Xindice question. You can google some of the words "java xml string node parse" and find some answers there.
 
This is a snippet from my code that might point you into the right direction as well:
 
            XMLResource document = (XMLResource) col.getResource(id);
            String docstr = (String) document.getContent();
            Document doc = DocumentHelper.parseText(docstr);
            Element dossier = doc.getRootElement();
            Element el1 = dossier.element("SomeNode");
            Element el2 = zitting.element("SomeSubNode");
            return el2.getText();
I import
    org.xmldb.api.modules.XMLResource
    org.dom4j.Document
    org.dom4j.Element
    org.dom4j.DocumentHelper
 
Good luck.
 
Jelle
----- Original Message -----
From: Imtiyaz
Sent: Tuesday, May 25, 2004 9:10 AM
Subject: how to separte node value from the result

hi all
 
using java programme i am writing programme which is used to
 
retrieve data from the xindice but the result are coming in a string
 
format. 
 
 
because result are coming in a xml tag format if i just
 
want to used  node value it will not possible to me
 
then how to separte the node value ?
 
is  there any api provided for this ?
 
 
i have xml file <note> one </note>
                     <note> two </note>
                      <note> three </note>
                       <note> four </note>
 
i written the xpath query /notes/notes[2]
 
result are coming
all the xml entry
<note> two </note>
 
but i just want answer will give me "two" in a string
 
sry for long mail
 
 
 

Yahoo! India Matrimony: Find your partner online.

Reply via email to