[HTML]View Plaincopy
- < beans &NBSP; xmlns = " Http://www.springframework.org/schema/beans " &NBSP;&NBSP;
- xmlns:xsi = " http://www.w3.org/2001/XMLSchema-instance " &NBSP;&NBSP;
- xsi:schemalocation =" HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/BEANS&NBSP;&NBSP;
- Http://www.springframework.org/schema/beans/spring-beans.xsd ">
The root node of the Beans--xml file.
xmlns--is an abbreviation for XML namespace because the tag name of the XML file is custom-written and other people-defined tags are likely to be duplicated and functionally different, so add a namespace to differentiate the XML file from the other XML file , similar to the package in Java.
xmlns:xsi--refers to XML files adhering to the XML specification, xsi full name: XML Schema instance, refers to the specific use of the schema resource files defined by the elements of the specification. That is,/spring-beans-2.0.xsd the elements defined in this file adhere to what standards.
xsi:schemalocation--refers to the specification that XML elements in this document conform to, and the schemalocation attribute is used to reference (schema) schema documents, and the parser can use this document to validate XML instance documents when needed. Its value (URI) is in pairs, the first value represents the namespace, the second value represents the specific location of the schema document that describes the namespace, and two values are separated by a space.
Overview of attributes in <beans> in Spring configuration file xml