I have read Xml File using code given below-
String XmlString = \"\"; String resourcePath=FilePathHelper.getResourceFilePath(request); BufferedRea
Change your regular expression to
XmlString=XmlString.replaceAll("\\<\\?xml(.+?)\\?\\>", "").trim();