The best XML Schema any element Tutorial In 2024, In this tutorial you can learn XML Schema any element
> <Any> element by element gives us the ability to expand is not specified by the schema of an XML document!
<Any> element by element gives us the ability to expand is not specified by the schema of an XML document!
The following example is quoted fragment from XML schema called "family.xsd" in. It shows a declaration for the "person" element. By using the <any> element, we can use any element (in the <lastname>) After extended "person" elements:
Now, we want to use the "children" element to extend the "person" element. Under such circumstances we can do it, even if the author of the schema above does not declare any "children" element.
Look at this schema file named "children.xsd":
The following XML file (named "Myfamily.xml"), used data from two different schema ingredients, "family.xsd" and "children.xsd":
Above the XML file is valid, which is due to schema "family.xsd" We allowed after "lastname" elements optional elements to expand "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.