shadowline
My First XML Page << Elements and Attributes >> Adding Some Style
Depending on who is teaching, different terms mean the same things...

The term elements means the tags.

The term attributes means properties.

<tag property="value">

Part of the previous example of XML looks like this :

      <movie>
         <title> Finding Nemo </title>
         <age_group> Kids </age_group>
         <comments> Fish are friends, not food. </comments>
      </movie>

Each piece of information is in its own element (tag). The child elements (nested tags) may be shown as attributes (properties) instead of elements. Here is the same example switching the TITLE tag into a property instead of being a full tag on its own...

      <movie title="Finding Nemo">
         <age_group> Kids </age_group>
         <comments> Fish are friends, not food. </comments>
      </movie>

The same effect can be done for any of the other child elements as well...

      <movie title="Finding Nemo" age_group="Kids" comments="Fish are friends, not food">
      </movie>

Technically, both styles of coding are correct. Having items as properties instead of tags though kinda defeats the purpose of modular XML processing.
My First XML Page << Elements and Attributes >> Adding Some Style
shadow

Advertise in the banner along the top, Click here!

Valid XHTML 1.0 Transitional Valid CSS! Text Link Ads
shadow
shadow