@@ -37,18 +37,6 @@ public static void setTransactionFieldDelimiter(String transactionFieldDelimiter
37
37
Transaction .TRANSACTION_FIELD_DELIMITER = transactionFieldDelimiter ;
38
38
}
39
39
40
- /**
41
- * Try to decode string value from xml node as per proper xml requirements
42
- * @param node which is a text element
43
- * @return decoded String value
44
- */
45
- public static String getDecodedString (Node node ) {
46
- String value = node .getTextContent ();
47
- String decodedValue = XmlUtility .create (value );
48
-
49
- return decodedValue ;
50
- }
51
-
52
40
public String toNVPString () { return "" ; }
53
41
54
42
public String toXMLString () { return "" ; }
@@ -72,9 +60,21 @@ public static void setEncapCharDelimiter(String encapCharDelimiter) {
72
60
* @return Node with encoded text value appropriate for XML
73
61
*/
74
62
public static Node getEncodedString (net .authorize .util .BasicXmlDocument document , String value ) {
75
- String encodedValue = XmlUtility .getXml (value );
63
+ String encodedValue = XmlUtility .escapeStringForXml (value );
76
64
Node node = document .getDocument ().createTextNode (encodedValue );
77
65
78
66
return node ;
79
67
}
68
+
69
+ /**
70
+ * Try to decode string value from xml node as per proper xml requirements
71
+ * @param node which is a text element
72
+ * @return decoded String value
73
+ */
74
+ public static String getDecodedString (Node node ) {
75
+ String value = node .getTextContent ();
76
+ String decodedValue = XmlUtility .descapeStringForXml (value );
77
+
78
+ return decodedValue ;
79
+ }
80
80
}
0 commit comments