Warning: include_once(): http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 2

Warning: include_once(http://www.confrage.com/bin/header.php): failed to open stream: no suitable wrapper could be found in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 2

Warning: include_once(): Failed opening 'http://www.confrage.com/bin/header.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 2
XMLタグの要素を全削除 | Java | 株式会社CONFRAGE
Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 17

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/menu.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 17
XMLタグの要素を全削除
XMLタグの要素を全削除するサンプルです。ファイル名だけ変更して、コピーして使えます。

import java.io.BufferedReader;
import java.io.FileReader;
public class test{
    public static void main(Sting[] args){
        try{
            FileReaer f = new FileReader("c:¥¥a.txt");
            BufferedReader b = new BufferedReader(f);
            String s;
            while((s = b.readLine()) != null){
                System.out.println(s.replaceAll(">.*<","><");
            }
        }catch(){
            System.out.println("ファイル読込失敗");
        }
    }
}

Back to top

Information

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 73

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/side_bar.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 73

Warning: include_once(/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php): failed to open stream: No such file or directory in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 82

Warning: include_once(): Failed opening '/home/sites/heteml/users/m/o/r/moriya-h5/web/confrage/bin/seo.php' for inclusion (include_path='.:/usr/local/php/5.6/lib/php') in /home/users/2/moriya-h5/web/confrage/java/tips/xml_del/xml_del.html on line 82