1.

How You Define Complex And Simple Type Of Element?

Answer»

In an XML Schema element are of two types.

  1. Complex Type Element
  2. SIMPLE Type Element

Complex Type Element: Complex Type Elements are elements those contain elements.

Simple Type Element: Simple Type Elements are elements those don’t contain any other elements.

I explain you complex and simple type of element with an example: 

<? xml version="1.0"?>

<note>

<to>Abhi</to>

<from>SUDHI</from>

<heading>Birthday WISH</heading>

<body>Happy Birthday Dear</body>

</note>

In the above example note element called as complex element because it contains elements(to, from, heading, body).And element to, from, heading and body called as Simple Type Element because it doesn't contain any other element.

In an XML Schema element are of two types.

Complex Type Element: Complex Type Elements are elements those contain elements.

Simple Type Element: Simple Type Elements are elements those don’t contain any other elements.

I explain you complex and simple type of element with an example: 

<? xml version="1.0"?>

<note>

<to>Abhi</to>

<from>Sudhi</from>

<heading>Birthday Wish</heading>

<body>Happy Birthday Dear</body>

</note>

In the above example note element called as complex element because it contains elements(to, from, heading, body).And element to, from, heading and body called as Simple Type Element because it doesn't contain any other element.



Discussion

No Comment Found