示例#1
0
  public static String removeXmlns(File file) throws IOException {
    InputStream forEncodingInput = new FileInputStream(file);
    String encoding = XMLHelper.getXMLEncoding(forEncodingInput);
    forEncodingInput.close();

    InputStream input = new FileInputStream(file);
    String xml = IOHelper.toString(encoding, input);
    xml = XMLHelper.removeXmlns(xml);
    input.close();
    return xml;
  }
示例#2
0
 public static String getXMLEncoding(InputStream inputStream)
     throws UnsupportedEncodingException, IOException {
   return getXMLEncoding(IOHelper.toString("UTF-8", inputStream));
 }