HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Composite elements contain only text can contain text and attributes.
This type contains only simple content (text and attributes), therefore we would like to add this content simpleContent elements. When using simple content, we must define the extension or restrict within simpleContent element, like this:
Tip: Use theextension or restriction element to expand or limit the types of simple basic elements. Here is an example of an XML element, "shoesize", which contains only text:
The following example declares a complex type whose content is defined as an integer value, and "shoesize" element contains a property named "country" of:
We can also set a name for the complexType element, and let the "shoesize" element type attribute to refer to this name (by using this method, several elements can refer to the same complex type):