List of utility methods to do XML String to Text Convert
Matcher | getMatcherForXmlTags(String xml, String tag) get Matcher For Xml Tags String regexCode = "(?<=<" + tag + ">)(.*?)(?=</" + tag + ">)"; Matcher m = regexGetMatcherForPattern(xml, regexCode); return m; |
Matcher | getMatcherWithSurroundingTags(String xml, String tag) get Matcher With Surrounding Tags String regexCode = "(<" + tag + ".*?>)(.*?)(</" + tag + ">)"; Matcher m = regexGetMatcherForPattern(xml, regexCode); return m; |
String | getValueInsideXmlTags(String xml, String openTag, String closeTag) get Value Inside Xml Tags String regexCode = "(?<=" + openTag + ")(.*?)(?=" + closeTag + ")"; return regexExtract(xml, regexCode); |
String | getValueInsideXmlTags(String xml, String tag) get Value Inside Xml Tags return getValueInsideXmlTags(xml, "<" + tag + ">", "</" + tag + ">"); |
String | getValueWithSurroundingTags(String xml, String tag) get Value With Surrounding Tags String regexCode = "(<" + tag + ".*?>)(.*?)(</" + tag + ">)"; return regexExtract(xml, regexCode); |