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
<AnyAttribute> element enables us to extend the XML document properties are not specified by the schema!
<AnyAttribute> element enables us to extend the XML document properties are not specified by the schema!
The following example is a fragment from the XML schema named "family.xsd" of. It shows us a statement against the "person" element. By using the <anyAttribute> element, we can add any number of attributes to the "person" element:
Now, we hope that through the "gender" attribute to extend the "person" element. In this case, we can do so, even if the author of the schema above never declared any "gender" attribute.
Look at this schema file named "attribute.xsd":
The following XML (called "Myfamily.xml"), the use of ingredients from different schema's, "family.xsd" and "attribute.xsd":
This XML file above is valid because the schema "family.xsd" allows us to add attributes to the "person" element.
<Any> and <anyAttribute> can be used to create scalable document! They have the ability to make the document did not contain a statement of the main XML schema through additional elements.