1,关闭xml检查
windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore
2,加入
<!DOCTYPE xml>
或者
<!DOCTYPE html>
如果报红叉,尝试
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/2002/xmlspec/dtd/2.10/xmlspec.dtd">