Help on
Stream Size :
The stream size indicator is the actual amount of bytes read from the Xml stream. It is given in bytes. A stream may be partially retrieved because of network problems or simply the user intentionally pressed the ESC key while the stream was being retrieved. When the stream is only partially retrieved, it is shown on the report with a
portion only flag.
Close this one
Help on
Nb total lines :
This indicator reflects the amount of end of lines in the stream. While not providing a tremendous meaning wrt the Xml content in the stream, the amount of lines when compared to the amount of elements reveals the flatness, resp. unflatness, of the stream. One may pay attention to Xml streams that are greatly indented and beautified so they are readable at the expense of real information carried by the stream. By the way here is an example of nb total lines :
Results in 8 nb total lines.
Close this one
Help on
Nb total elements :
This indicator is the amount of Xml elements in the stream. An element is one of the elementary components of an Xml stream : it is scoped with < and > and may have a companion end-tag such like in the example below. Elements have zero, one or more attributes.
In this Xml portion,
Bookstore,
Book and
Title are elements. Bookstore is the root element of the Xml stream.
Hint : the content declared within an element can be empty : in this particular case, one is encouraged to use the empty tag syntax instead of end-tag, for performance reasons including size and parsing speed. See below. The element hierarchy is equivalent to the structure of a database.
Empty tag : <Book Genre="Thriller" In_Stock="Yes"/>
End-tag : <Book Genre="Thriller" In_Stock="Yes">The Round Door</Book>
Close this one
Help on
Nb total attributes :
This indicator totalizes the amount of attributes in the stream. Attributes can be regarded as details of a given element and are part of its scope. Attributes are stricter in the Xml syntax than they are in the Html syntax in that they must be assigned to a value, even when the value is empty.
Hint : contrary to an element, an attribute can appear only once at most in the scope of an element. There is no declarable datatype for an attribute, though attributes may be declared in the DTD (Document Type Definition). Attributes take less "space" in the stream compared to elements because they have no end-tag counterpart, hence attributes are good candidates for 1-cardinality element-to-element relations.
In this Xml portion,
Genre and
In_Stock are attributes of the Book element instance.
Close this one
Help on
Nb total CDATA sections :
This indicator totalizes the amount of CDATA sections in the stream. If there is at least one CDATA section in the stream then the report also figures out the ratio of size due to such sections wrt total size of the stream, allowing to check out whether or not there is a significant amount of it. A CDATA section in an Xml stream is much like a comment. The only difference in behavior is that a given Xml client application may react differently with CDATA sections than comments, so that's up to software developers to tell, not Xml itself. Generally speaking, comments are seen but not read by Xml client applications, unlike CDATA sections. The syntax is new to the web developer : it begins with
<![CDATA[ followed by any content including carriage returns, and it ends with
]]>. See below.
Hint : use CDATA sections as little as you can. One reason for this is that they don't follow the Xml syntax, thus are not useful to its comprehension.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Bookstore SYSTEM "bookshop.dtd">
<Bookstore>
<![CDATA[ J&R Booksellers Database ]]>
<Book Genre="Thriller" In_Stock="Yes">
<Title>The Round Door</Title>
</Book>
</Bookstore>
Close this one
Help on
Nb total process instructions :
This indicator totalizes the amount of process instructions in the stream. A process instruction is a proprietary CDATA section in that it is meant to have a special effect when read by a given Xml client application, hence the words "process instructions". For all Xml parsers, its default meaning is simple comment. The syntax is new to the web developer : it begins with
<? followed by an instruction name followed by any content including carriage returns, and it ends with
?>. In the example below, the xml statement in the prolog exhibits a general purpose process instruction which is part of the Xml standard itself, and is used to declare the encoding charset.
Hint : use process instructions as little as you can. In the real world, process instructions are barely used because the specifics should always lie on the client implementation, not on the Xml stream itself.
Close this one
Help on
Nb total namespaces :
This indicator totalizes the amount of namespaces used in the stream. A namespace exemplifies the use of certain name prefixes in Xml elements, Xml attributes and even content. Namespaces where first meant to solve conflicts between two Xml streams (from two different companies) that used Xml structures that had the same element or attribute names. But as far as we are, conflicts are not solved, and probably won't ever because if there's any company that takes the lead on meanings of given elements, then Xml will not be standard any longer. Just a proprietary format like any kind of closed-source binary format. Thus not interoperable.
For instance, instead of declaring book, title, genre elements and so on, an authority can declare once for all a bookstore prefix which thus gives a special meaning to book:book, book:title and book:genre. A namespace is declared by a special attribute of the form xmlns:<something> where <something> is any prefix. To "use" the namespace, you simply prefix elements, attributes and even content with this prefix. See below.
Namespaces can also be seen as a great way to add data type definition to the DTD (Document Type Definition), especially to better handle dates and currencies. But only a dedicated Xml client application can take advantage of a given namespace. There are too many implications to be covered here.
Namespaces is a powerful thing but it completely wrecks the Xml standard itself by hiding meanings behind prefixes. The essential work since 1997's Xml has been to popularize namespaces such like Xml schemas, in favor of the biggest companies such like Microsoft or Oracle.
Hint : do not use namespaces because it has an overhead on the stream size. Each prefix requires a given small amount of bytes. When you sum up all this, this can be significant. This is revealed in this report.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Bookstore SYSTEM "bookshop.dtd">
<Bookstore xmlns:book="http://www.microsoft.com/namespaces/monopoly/book">
<-- J&R Booksellers Database -->
<book:Book book:Genre="Thriller" book:In_Stock="Yes">
<book:Title>The Round Door</book:Title>
</book:Book>
</Bookstore>
Close this one