<?XML version= "1.0" encoding= "UTF-8"?><Beansxmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"XMLNS:AOP= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"Xmlns:tx= "Http://www.springframework.org/schema/tx"Xmlns:context= "Http://www.springframework.org/schema/context"xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans-3.0.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/ SPRING-TX-3.0.XSDHTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework.org/schema/aop/ Spring-aop-3.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/ Spring-context-3.0.xsd "></Beans>
This has not been understood, the search today, to find an explanation, is not a good explanation of my question. I want to add!
XML Schema namespace function:
1. Avoid naming conflicts, like the package in Java
2. Classify labels with different roles (the TX namespace in spring, for the label of the transaction class, the context namespace for the label of the component)
Code Explanation:
1, xmlns= "Http://www.springframework.org/schema/beans"
Declares the default namespace for the XML file, which represents the default namespace for all labels that do not use other namespaces.
2, xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
Declares an XML Schema instance that can be declared to use the SchemaLocation property.
3, xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"
Declares a namespace with a prefix of AOP, and subsequent URLs that are used to indicate namespaces are not used by the parser to find information. Its only function is to give the namespace a unique name. When a namespace is defined in the start tag of an element, all child elements with the same prefix are associated with the same namespace.
4, xsi:schemalocation= "
Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
This can be seen from the name of a general, the location of the specified schema this property must be used in conjunction with the namespace. This property has two values, and the first value represents the namespace that needs to be used. The second value represents the location of the XML schema for use by the namespace
So what kind of tags do we need when we introduce what namespaces and schema definitions are available.
http://iswift.iteye.com/blog/1657537
Description of the Spring configuration file header file