我正在尝试通过 XSD.exe 将 XML 文档转换为 XSD;当遇到英镑符号 (£) 作为无效字符时,它会失败。
我对 XML 的快速总结如下:
<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar>
<title>Text text text £5! text text</title>
</bar>
</foo>
据我所知,井号符号并不是特别特殊且必须转义,并且 XML 是有效的 UTF-8 编码文档;但是在运行 xsd.exe 时,该符号会出现以下错误:
Error: There was an error processing 'test.xml'.
- Invalid character in the given encoding. Line 562, position 52.
If you would like more help, please type "xsd /?".
过去有没有人遇到过类似的问题?或者有任何线索我怎样才能让它工作?
谢谢!