Ptlink0.settext (Arbu.getptlink (). Replace ("&", "&" )); // if the substitution like ' & ', ' & ' is not possible, because ' is used for char, to replace the character sequence, you need to use ""
. Replace is used to replace multiple char characters or sequence of characters (String):
//when reading, the parser automatically converts it back to special characters such as "&", "<", ">", and, normally, only the "<" character and "&" characters are strictly forbidden for XML. //The following are the characters that need to be escaped in XML://& (Logic and) &//< (less than) <//> (greater than) >//"(double quotes) "//' (single quotes) '//when the browser opens the XML file, the escape character is automatically reversed and displayed normally//when parsing the XML, the parser automatically converts it back to special characters such as "&", "<", ">", and so does not need to be escaped for recoverability.Ptlink0.settext (Arbu.getptlink (). Replace ("&", "&"). Replace ("<", "<"). Replace (">", ">"). Replace ("\" "," " "). Replace ("\", "'") );
Java Foundation string wrapper class. Use of the Replace method and usage scenarios for char and character sequences