how to remove Xml version string from String

后端 未结 5 1990
情书的邮戳
情书的邮戳 2021-02-05 12:11

I have read Xml File using code given below-

  String XmlString = \"\";
  String resourcePath=FilePathHelper.getResourceFilePath(request);



        BufferedRea         


        
5条回答
  •  遥遥无期
    2021-02-05 13:03

    Change your regular expression to

    XmlString=XmlString.replaceAll("\\<\\?xml(.+?)\\?\\>", "").trim();
    

提交回复
热议问题