Attribute overview in <beans> in Spring configuration file XML, xmlbeans
[Html]View plaincopy
- <Beans xmlns = "http://www.springframework.org/schema/beans"
- Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"
- Xsi: schemaLocation = "http://www.springframework.org/schema/beans
- Http://www.springframework.org/schema/beans/spring-beans.xsd>
Beans -- root node of the xml file.
Xmlns -- the abbreviation of XML NameSpace, because the tag names in the XML file are custom, and the tags you write and the tags defined by others are likely to be renamed repeatedly, but the functions are different, therefore, you need to add a namespace to distinguish this xml file from other xml files, similar to the package in java.
Xmlns: xsi refers to the xml file that complies with the xml specification. xsi Full name: xml schema instance, refers to the standard of elements defined in the schema resource file used in particular. That is, what standards are observed for the elements defined in the/spring-beans-2.0.xsd file.
Xsi: schemaLocation -- refers to the specification observed by xml elements in this document. The schemaLocation attribute is used to reference the schema document, the parser can use this document to verify the XML instance document as needed. Its values (URIs) are paired. The first value indicates the namespace, and the second value indicates the location of the schema document of the namespace, the two values are separated by spaces.