public String getTagData(String strData, String strTag)
    {
        int iStartData = strData.indexOf('<' + strTag + '>');
        if (iStartData == -1)
            return null;
        iStartData = iStartData + strTag.length() + 2;
        int iEndData = strData.indexOf("</" + strTag + '>');
        if (iStartData == -1)
            return null;
        return strData.substring(iStartData, iEndData);
    }
public String getTagData ( String strData , String strTag ) { int iStartData = strData . indexOf ( '<' + strTag + '>' ) ; if ( iStartData == - 1 ) return null ; iStartData = iStartData + strTag . length ( ) + 2 ; int iEndData = strData . indexOf ( "</" + strTag + '>' ) ; if ( iStartData == - 1 ) return null ; return strData . substring ( iStartData , iEndData ) ; }
Find the data between these XML tags.
@param strData The XML code to find the tags in.
@param strTag The tag to find.