我要建立一个字符串,一般来说就是""包住字符串的内容, 可我的字符串中也必须得有",我的字符串内容如下,我该怎么写这个字符串啊?
<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/">

解决方案 »

  1.   

    <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/\"> 进行一次转义
      

  2.   

    转义下就行了
    System.out.println("testeeeeeeeeeeee\"The eeee\" in eeeee.");
      

  3.   

    <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/\\"> 使用二次转义