Java tutorial
//package com.java2s; public class Main { public static String getNode(String plain, String nodename) { if (plain.indexOf("<" + nodename + ">") < 0) return ""; return plain.substring(plain.indexOf("<" + nodename + ">") + nodename.length() + 2, plain.indexOf("</" + nodename + ">")); } }