Home > DeveloperSection > Interviews > What is Element and attributes in XML?

Posted on    April-02-2013 3:02 AM

 1 Answer(s)
  1118  View(s)
Rate this:

Vijay Shukla

Total Post:81

Posted on    April-02-2013 12:00 AM

The basic building blocks of XML Schemas are elements and attributes. Data types define the valid content that elements and attributes contain. When you create XML Schemas, you define the individual elements and attributes and assign valid types to them. Elements describe data, whereas attributes are like properties of an element, in that they provide further definition about the element the way that properties describe characteristics of objects and classes.

An element describes the data that it contains. Elements can also contain other elements and attributes.

An attribute is a named simple-type definition that cannot contain other elements. Attributes can also be assigned an optional default value and they must appear at the bottom of complex-type definitions.

Don't want to miss updates? Please click the below button!

Follow MindStick