Click here to Skip to main content
15,917,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 9-Sep-17 13:42pm
Comments
Graeme_Grant 9-Sep-17 19:36pm    
Depends on where in the specification that you are reading. You give us no context. What section number & title?

1 solution

If you read a bit further to section 4.4.5 Included in Literal, you would have found this example of an Entity:
XML
<!ENTITY % YN '"Yes"' >
<!ENTITY WhatHeSaid "He said %YN;" >

With RFCs, it always pays to read the full document.
 
Share this answer
 
Comments
Biruk Abebe 10-Sep-17 2:13am    
Yes i do get what entities are, how and when they are used. My question is about the relationship of an entity to a "storage unit" in this context? Why is the internal entity "WhatHeSaid" in the example considered as a storage unit?
Graeme_Grant 10-Sep-17 2:44am    
In section "1 Introduction" they are defined as: "XML documents are made up of storage units called entities, which contain either parsed or unparsed data." and section "2.8 Prolog and Document Type Declaration" states "The function of the markup in an XML document is to describe its storage and logical structure and to associate attribute name-value pairs with its logical structures."

Again, with RFCs, it always pays to read the full document.

Why does this level of detail matter? Are you going to do an exam or assignment on it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900