#!/bin/shcd 'home/usrname/'ls cd '/home/usrname/VOC2007/Annotations/' for file in `ls /home/usrname/VOC2007/Annotations/`do echo $file sed -i '/<?xml version="1.0" ?>/d' $filedone echo 'all is ok.'…
背景:java读取xml文件,xml文件内容只有“<?xml version="1.0" encoding="UTF-8"?>”一行 java读取该xml文件时,报“org.xml.sax.SAXParseException: Premature end of file”错误. java解析xml文件时抛出异常: org.xml.sax.SAXParseException: Premature end of file.at com.sun.org.apa…