XML中的存储单元究竟是什么? [英] What exactly are storage units in XML?

查看:89
本文介绍了XML中的存储单元究竟是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图更多地了解XML文档的物理和逻辑结构。 来自W3C的规范描述物理结构:



XML文档可能包含一个或多个存储单元。这些被称为实体; ...



所以我的问题是:



1.到底是什么在这种情况下引用的存储单元?

2.它是从XML处理器的角度使用它是如何在内存中存储和操作XML文档的,还是指用于存储文档的持久存储?



我尝试了什么:



阅读规范但无法理解其含义和存储单元在XML中的上下文。

解决方案

如果您进一步阅读 4.4.5包含在文字部分,我会找到一个实体的例子:

 <  !ENTITY        YN    '是'   >  
< !ENTITY WhatHeSaid 表示 %YN; >



使用RFC,读取完整文档总是值得的。


I am trying to understand more on the physical and logical structure of an XML document. From the specification at W3C describing the physical structures:

An XML document may consist of one or many storage units. These are called entities;...

So my question is:

1. What exactly is a storage unit referring in this context?
2. Is it used from the perspective of an XML processor and how it would store and manipulate the XML document in memory or is it referring to a persistent storage used to store the document?

What I have tried:

Read the specification but could not understand the meaning and context of what a storage unit is in XML.

解决方案

If you read a bit further to section 4.4.5 Included in Literal, you would have found this example of an Entity:

<!ENTITY % YN '"Yes"' >
<!ENTITY WhatHeSaid "He said %YN;" >


With RFCs, it always pays to read the full document.


这篇关于XML中的存储单元究竟是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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