1 package org.kuali.ole.docstore.utility;
2
3 import java.util.regex.Matcher;
4 import java.util.regex.Pattern;
5
6
7
8
9
10
11
12
13 public class XMLUtility {
14 public static final String FIELD_SEPERATOR = ",";
15
16 public StringBuffer getAllContentText(String content) {
17 String reg = "<.*>(.*)<\\/.*?>";
18 Pattern p = Pattern.compile(reg);
19 StringBuffer buffer = new StringBuffer();
20 if (content.length() > 0) {
21 Matcher m = p.matcher(content);
22 while (m.find()) {
23 String allText = m.group(1);
24 buffer.append(allText + FIELD_SEPERATOR);
25 }
26 }
27 return buffer;
28
29 }
30
31
32 }