求一个字符串的问题

linus_liu2000 2009-08-14 01:23:10
我要建立一个字符串,一般来说就是""包住字符串的内容, 可我的字符串中也必须得有",我的字符串内容如下,我该怎么写这个字符串啊?
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
...全文
91 5 打赏 收藏 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tempsun88 2009-08-14
  • 打赏
  • 举报
回复
怎么不给我分啊,我需要一分
tempsun88 2009-08-14
  • 打赏
  • 举报
回复
<soap:Envelope xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\" xmlns:xsd=\\"http://www.w3.org/2001/XMLSchema\\" xmlns:soap=\\"http://schemas.xmlsoap.org/soap/envelope/\\">

使用二次转义
arborous 2009-08-14
  • 打赏
  • 举报
回复
转义下就行了
System.out.println("testeeeeeeeeeeee\"The eeee\" in eeeee.");
bigbug9002 2009-08-14
  • 打赏
  • 举报
回复
用\"转义一下
goosman 2009-08-14
  • 打赏
  • 举报
回复
<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">

进行一次转义

62,620

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧