KickStart Tutorial XML by Jan Kampherbeek - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

XML Attributes

Attributes

Elements in XML can use attributes. The syntax is:

 

<element attribute-name = "attribute-value">....</element>

The value of an attribute needs to be quoted, even if it contains only numbers. An example
<car color = "green">volvo</car>

The same information can also be defined without using attributes: <car>
<brand>volvo</brand> <color>green</color>
</car>

Avoid attributes

When possible try to avoid attributes. Data structures are more easy described in XMLtags.
Software that checks XML-documents can do a better job with tags than with attributes.

Find Your Next Great Read

Describe what you're looking for in as much detail as you'd like.
Our AI reads your request and finds the best matching books for you.

Showing results for ""

Popular searches:

Romance Mystery & Thriller Self-Help Sci-Fi Business