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
Empty the contents of the composite elements can not contain only contain attributes.
An empty XML element:
The above "product" no element content. To define no content type, we must declare a type can contain only elements in its content, but in fact we do not declare any element, like this:
In the above example, we define a complex type with complex content. ComplexContent element gives the signal that we intend to define or expand the content model of a complex type, and integer defining a property is declared but does not introduce any element content.
However, this statement can be more compact "product" elements:
Or you can give a name to a complexType element, and then set a type attribute "product" and refer to this complexType element name (by using this method, several elements can refer to the same complex type):