XML属性中允许的最大字符数是多少? [英] What is the max number of characters allowed in an XML attribute?

查看:496
本文介绍了XML属性中允许的最大字符数是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在XML属性中允许的最大字符数标准?

Is there a standard for the maximum number of characters allowed in an XML attribute?

我尝试研究W3C联盟,除了一些关于转义特殊字符的注释外,在字符限制方面什么也找不到.

I tried researching W3C consortium and couldn't find anything on the character limit aside from some notes on escaping special characters.

推荐答案

我不认为每个XML规范都有字符限制,但是最佳实践是保持属性值简短.

I don't believe there is a character limit per the XML specification, but the Best Practice is to keep attribute values short.

如果属性值变长,则可能是它应该是自己的元素,而不是另一个元素上的属性.

If an attribute value grows long...chances are that it should be an element of its own rather than an attribute on another element.

这篇关于XML属性中允许的最大字符数是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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