Name | Uses |
---|---|
attribute | attributes of elements |
identifier | all elemetns <root> etc |
identifier-namespace | name prefixes |
url | link value |
value | the value of an attribute |
comment | a comment |
Output:
Source Code:
<pre class="ft-syntax-highlight" data-syntax="xml" data-syntax-theme="midnight" data-showTooltips="true">
<code>
<span class="comment"><!-- this is a namespace example --></span>
<<span class="identifier">root</span> <span class="attribute">xmlns</span>:<span class="identifier-namespace">h</span>="<span class="url">http://www.w3.org/TR/html4/</span>">
<<span class="identifier-namespace">h</span>:<span class="identifier">table</span>>
<<span class="identifier-namespace">h</span>:<span class="identifier">tr</span>>
<<span class="namespace">h</span>:<span class="identifier">td</span>>Apples<<span class="identifier-namespace">/h</span>:<span class="identifier">td</span>>
<<span class="identifier-namespace">h</span>:<span class="identifier">td</span>>Bananas<<span class="identifier-namespace">/h</span>:<span class="identifier">td</span>>
<<span class="identifier-namespace">/h</span>:<span class="identifier">tr</span>>
<<span class="identifier-namespace">/h</span>:<span class="identifier">table</span>>
<<span class="identifier">/root</span>>
<span class="comment"><!-- this is a generic example --></span>
<<span class="identifier">bookstore</span>>
<<span class="identifier">book</span> <span class="attribute">category</span>="<span class="value">children</span>">
<<span class="identifier">title</span>>Harry Potter<<span class="identifier">/title</span>>
<<span class="identifier">author</span>>J K. Rowling<<span class="identifier">/author</span>>
<<span class="identifier">year</span>>2005<<span class="identifier">/year</span>>
<<span class="identifier">price</span>>29.99<<span class="identifier">/price</span>>
<<span class="identifier">/book</span>>
<<span class="identifier">book</span> <span class="attribute">category</span>="<span class="value">web</span>">
<<span class="identifier">title</span>>Learning XML<<span class="identifier">/title</span>>
<<span class="identifier">author</span>>Erik T. Ray<<span class="identifier">/author</span>>
<<span class="identifier">year</span>>2003<<span class="identifier">/year</span>>
<<span class="identifier">price</span>>39.95<<span class="identifier">/price</span>>
<<span class="identifier">/book</span>>
<<span class="identifier">/bookstore</span>>
</code>
</pre>