正規表現を使って、xmlからXML宣言をとりのぞきたい。
2007/05/01

シナリオ:
xmlからXML宣言をとりのぞきたい。
public static String deleteXMLDeclaration(String s){
//s =s.replaceFirst("<\\?xml(.*)\\?>", "");
s =s.replaceFirst("<\\?xml((?!\\?>).)*\\?>", "");
return s;
}
シナリオ:
xmlからXML宣言をとりのぞきたい。
: