是否有人对名称中带有破折号的元素进行过任何类型的 XML 配对?我认为这是不可能的,有什么想法吗?
<Person-Response>
<First-Name> 3119043033121014002</First-Name>
<Last-Name> 3119043033121014002</Last-Name>
</Person-Response>
最佳答案
关于破折号,见官方XML recommendation of the W3C :
Document authors are encouraged to use names which are meaningful words or combinations of words in natural languages, and to avoid symbolic or white space characters in names. Note that COLON, HYPHEN-MINUS, FULL STOP (period), LOW LINE (underscore), and MIDDLE DOT are explicitly permitted.
关于Java XML 解析标准,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5458355/