Relationship Between XML files and XSD files

Source: Internet
Author: User

1. The XSD file defines the element and type in a namespace. The type defined here is used by element (this namespace or another namespace), but not by XML files.

 

2. the XML file has a unique root element.

 

3. When creating an XML file, you can specify which namespaces are used in the root element to use the element.

Discussion: root element also belongs to a namespace. Because other elements are sub-elements of this root element, do you only need

Root element namespace? This depends on the definition of the type of the root element.

If you reference the element or type of another namespace in the Type Definition of the root element (and the element in the type definition), you need to introduce other namespaces.

 

In summary, there is no direct link between the XML file and the XSD file. They are associated through namespace, that is

 

Add element use element

XSD file --------------------------> namepsae ---------------------------> XML file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.