Reputation: 23
I need to create a String variable . that should be like following variable.
String search = "xmlns="http://tempuri.org/" />";
but I cannot assign xmlns="http://tempuri.org/" /> directly into a String variable because tempuri.org/" />"; get commented automatically.
I need a format this string and finally variable should be like this
search = xmlns="http://tempuri.org/" /> ;
How can I achieve this ?
Upvotes: 0
Views: 82
Reputation: 947
You need to use escape characters:
String search = "xmlns=\"http://tempuri.org/\" />";
Version from the comments:
String search = "xmlns=\"tempuri.org/\"; /></soap:Body>";
Upvotes: 2
Reputation: 48258
You have to escape the special chars i.e replace the " for \"
String search = "xmlns=\"http://tempuri.org/\" />";
Upvotes: 1