html Tidy 出于某种原因将此作为输出:
<?xml version="1.0" encoding="utf-16"?>
<?xml version="1.0" encoding="utf-16"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
...rest of document
所以有 2 个 xml 标头,并且类型错误(不是 UTF-8)。有没有办法删除第二个标头,将其更改为 UTF-8,并使用 XSL 删除 DOCTYPE?