我们可以在 XML 文件中使用数字作为文本节点吗? [英] can we use a number as text node in XML file?

查看:25
本文介绍了我们可以在 XML 文件中使用数字作为文本节点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以使用数字作为 XML 文件中的文本节点吗?例如

can we use a number as text node in XML file? for example

<2>
 <abi>Zen</abi>
</2>

报错如下

推荐答案

XML 元素必须遵循以下命名规则:

XML elements must follow these naming rules:

* Names can contain letters, numbers, and other characters
* Names cannot start with a number or punctuation character
* Names cannot start with the letters xml (or XML, or Xml, etc)
* Names cannot contain spaces

http://www.w3schools.com/xml/xml_elements.asp

这篇关于我们可以在 XML 文件中使用数字作为文本节点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆