Changeset 25612 for main/trunk/gli/src
- Timestamp:
- 2012-05-16T16:41:26+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/util/XMLTools.java
r25610 r25612 955 955 { 956 956 String text = e.getNodeValue(); 957 text = text.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("^[\\n\\r\\t\\s]*", "") ;957 text = text.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("^[\\n\\r\\t\\s]*", "").replaceAll("[\\n\\r\\t\\s]*$", ""); 958 958 sb.append(text); 959 959 } … … 1005 1005 if (children.item(i).getNodeType() == Node.TEXT_NODE && indent) 1006 1006 { 1007 if (children.item(i).getNodeValue(). matches("[^\\s]*"))1007 if (children.item(i).getNodeValue().trim().length() > 0) 1008 1008 { 1009 1009 indentSwapped = true;
Note:
See TracChangeset
for help on using the changeset viewer.