Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The documentation in the w3 link </p> <p><a href="http://www.w3.org/TR/REC-xml/#sec-starttags" rel="noreferrer">http://www.w3.org/TR/REC-xml/#sec-starttags</a></p> <p>says that this are the recomended forms.</p> <pre><code>&lt;test&gt;&lt;/test&gt; &lt;test/&gt; </code></pre> <p>The attribute mentioned in the other answer is validation mechanism and not a representation of state. Please refer to the <a href="http://www.w3.org/TR/xmlschema-1/#xsi_nil" rel="noreferrer">http://www.w3.org/TR/xmlschema-1/#xsi_nil</a></p> <blockquote> <p>XML Schema: Structures introduces a <strong>mechanism for signaling that an element should be accepted as ·valid·</strong> when it has no content despite a content type which does not require or even necessarily allow empty content. An element may be ·valid· without content if it has the attribute xsi:nil with the value true. <strong>An element so labeled must be empty</strong>, but can carry attributes if permitted by the corresponding complex type.</p> </blockquote> <p>To clarify this answer: Content </p> <pre><code> &lt;Book&gt; &lt;!--Invalid construct since the element attribute xsi:nil="true" signal that the element must be empty--&gt; &lt;BuildAttributes HardCover="true" Glued="true" xsi:nil="true"&gt; &lt;anotherAttribute name="Color"&gt;Blue&lt;/anotherAttribute&gt; &lt;/BuildAttributes&gt; &lt;Index&gt;&lt;/Index&gt; &lt;pages&gt; &lt;page pageNumber="1"&gt;Content&lt;/page&gt; &lt;/pages&gt; &lt;!--Missing ISBN number could be confusing and misguiding since its not present--&gt; &lt;/Book&gt; &lt;/Books&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload