The <any> element enable us to extend the XML document with elements not specified by the schema!
The <any> Element
The <any> element enable us to extend the XML document with
elements not specified by the schema.
The following example is
the fragment from an XML schema called "family.xsd". It shows a
declaration for "person" element. By using the <any> element
we can extend (after <lastname>) the content of "person" with
any elements:
Now we want to extend the "person" element with "children"
element. In this case we can do so, even if the author of the
schema above never declared any "children" elements.
The XML file above is valid because the schema "family.xsd"
allow us to extend the "person" element with an optional
element after the "lastname" element.
The <any> and <anyAttribute>
elements are used to make EXTENSIBLE document! They allow
documents to contain additional element that are not declared
in the main XML schema.
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
XSD any element,xsd data types,xsd data type,visual studio xsd,xsd tutorial,xsd optional element,xsd attributes,xsd xml,xsd examples,cdata xsd,xsd namespace