XML Attributes Must Be Enclosed in Quotes

In XML, tags may have attributes assigned as name/value pairs. For example, in the XML document describing a test for the Math Game, I could extend the definition of the <test> tag to include a test identification number for the purpose of describing the level of difficulty.

<test testID="1A">

In this example, testID is an attribute of the tag <test> and it must be assigned a value using quotes.

Use child elements instead of attributes as much as possible in your XML documents. There are no rules in XML that state when to use attributes or child elements; however, it is usually easier to include a child element instead of an attribute. For example, instead of using the testID attribute, you could just as easily include it as a child element of <test>.

<testID>1A</testID>

Biorhythm Awareness

Biorhythm Awareness

Who else wants to take advantage of biorhythm awareness to avoid premature death, escape life threatening diseases, eliminate most of your life altering mistakes and banish catastrophic events from your life.

Get My Free Ebook


Post a comment