<?xml version="1.0" encoding="UTF-8"?>
<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>

第一行:宣告此檔案xml格式,版本1.0 編碼 UTF-8格式

第二行:插入beans標籤並引入一個名稱空間xmlns="http://www.springframework.org/schema/beans"沒有使用名稱空間字首

第三行:xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"宣告一個名稱空間"http://www.w3.org/2001/XMLSchema-instance"字首為xsi,此名稱空間為xml遵循w3的一個標準標籤規範名稱空間。

第四行:使用xsi字首的名稱空間屬性schemaLocation指定一個名稱空間和schema檔案的位置,注意順序。