public static
String getToken(String sContent,
String sToken,
String sTokenEnd) throws Exception
{
if (sContent != null && sContent.indexOf(sToken) >= 0)
{
sContent = sContent.substring(sContent.indexOf(sToken) + sToken.length());
return sContent.substring(0, sContent.indexOf(sTokenEnd));
}
return null;
}
note that number of <docid>....</docid> may vary
if the method is called like this getToken("abc<docid>58585</docid>jkdfklgjrit<docid>4535345</docid>tuturtut<docid>45355</docid>" , <docid>,</docid>
then this function returns only one value of occurence of <docid>...</docid> , how can i make this function to return to return a String array containing all values found between <docid> .....</docid>
[ April 30, 2002: Message edited by: vivek sivakumar ]
[ April 30, 2002: Message edited by: vivek sivakumar ]