<vCard xmlns="vcard-temp"><FN/><type>asdasdasd</type><PHOTO><TYPE>image/jpg</TYPE><BINVAL>456.jpg</BINVAL</PHOTO></vCard> ,在这个字符串中,我要怎么样才能得到456.jpg,其他的都不要,,,有劳各位老手了、、
------解决方案--------------------------------------------------------
- Java code
int index = str.indexOf("</BINVAL"); //如果格式不变的话..str = str.substring(0, index);index = str.lastIndexOf(">");System.out.println(str.substring(index + 1, str.length()));