title: Valid XML document must have a root tag
body: <p>I find stackoverflow with it, and find a post in Android, but I don't think this is fit me.</p>
  
  <p><a href="https://stackoverflow.com/questions/27488183/selector-for-button-error-valid-xml-document-must-have-a-root-tag">Selector for button error &quot;Valid XML document must have a root tag&quot;</a></p>
  
  <p>My snapshot is below:</p>
  
  <p><a href="https://i.stack.imgur.com/BRPwL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BRPwL.jpg" alt="enter image description here"></a></p>
  
  <p>And my code in <code>spring_datasource.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:p="http://www.springframework.org/schema/p"
         xmlns:context="http://www.springframework.org/schema/context"
         xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:mvc="http://www.springframework.org/schema/mvc"
         xmlns:task="http://www.springframework.org/schema/task" xmlns:cache="http://www.springframework.org/schema/cache"
         xsi:schemaLocation="http://www.springframework.org/schema/beans
                      http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
                      http://www.springframework.org/schema/context
                      http://www.springframework.org/schema/context/spring-context-3.1.xsd
                      http://www.springframework.org/schema/tx
                      http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
                      http://www.springframework.org/schema/aop
                      http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
                      http://www.springframework.org/schema/mvc
                      http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
                      http://www.springframework.org/schema/task
                      http://www.springframework.org/schema/task/spring-task-3.1.xsd
                      http://www.springframework.org/schema/cache
                      http://www.springframework.org/schema/cache/spring-cache.xsd"&gt;
  
  
      &lt;!--资源载入器 --&gt;
      &lt;bean
              class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
          &lt;property name="locations"&gt;
              &lt;list&gt;
                  &lt;value&gt;classpath:config.properties&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;!--数据连接池 --&gt;
      &lt;bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
            init-method="init" destroy-method="close"&gt;
          &lt;property name="url" value="${connection.url}" /&gt;
          &lt;property name="username" value="${connection.username}" /&gt;
          &lt;property name="password" value="${connection.password}" /&gt;
          &lt;property name="initialSize" value="${connection.initialSize}" /&gt;
          &lt;property name="minIdle" value="${connection.minIdle}" /&gt;
          &lt;property name="maxActive" value="${connection.maxActive}" /&gt;
  
          &lt;!-- 配置获取连接等待超时的时间 --&gt;
          &lt;property name="maxWait" value="60000" /&gt;
          &lt;!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 --&gt;
          &lt;property name="timeBetweenEvictionRunsMillis" value="60000" /&gt;
          &lt;!-- 配置一个连接在池中最小生存的时间，单位是毫秒 --&gt;
          &lt;property name="minEvictableIdleTimeMillis" value="300000" /&gt;
          &lt;property name="testWhileIdle" value="true" /&gt;
          &lt;property name="testOnBorrow" value="false" /&gt;
          &lt;property name="testOnReturn" value="false" /&gt;
      &lt;/bean&gt;
  
      &lt;!-- (事务管理)transaction manager, use JtaTransactionManager for global tx --&gt;
      &lt;bean id="transactionManager"
            class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
          &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
      &lt;/bean&gt;
  
      &lt;!-- 基于注解的事物管理 --&gt;
      &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt;
      &lt;!-- 当在web.xml 中DispatcherServlet使用&lt;url-pattern&gt;/&lt;/url-pattern&gt; 映射时，
      能映射静态资源（当Spring Web MVC框架没有处理请求对应的控制器时（如一些静态资源），
      转交给默认的Servlet来响应静态文件，否则报404找不到资源错误，）。--&gt;
      &lt;mvc:default-servlet-handler /&gt;
  
      &lt;!-- spring和hibernate整合 --&gt;
      &lt;bean id="sessionFactory"
            class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource" /&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.dialect"&gt;
                      ${hibernate.dialect}
                  &lt;/prop&gt;
                  &lt;prop key="hibernate.show_sql"&gt;
                      ${hibernate.show_sql}
                  &lt;/prop&gt;
                  &lt;prop key="hibernate.format_sql"&gt;
                      ${hibernate.format_sql}
                  &lt;/prop&gt;
                  &lt;prop key="hibernate.hbm2ddl.auto"&gt;
                      ${hibernate.hbm2ddl.auto}
                  &lt;/prop&gt;
                  &lt;prop key="hibernate.jdbc.batch_size"&gt;
                      ${hibernate.jdbc.batch_size}
                  &lt;/prop&gt;
                  &lt;prop key="hibernate.autoReconnect"&gt;true&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
          &lt;property name="packagesToScan"&gt;
              &lt;list&gt;
                  &lt;value&gt;com.ldl.vision86.common.basis.entity&lt;/value&gt;
                  &lt;value&gt;com.ldl.vision86.business.entity&lt;/value&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;!-- 定时器配置
          task:executor/@pool-size：可以指定执行线程池的初始大小、最大大小
          task:executor/@queue-capacity：等待执行的任务队列的容量
          task:executor/@rejection-policy：当等待队已满时的策略，分为丢弃、由任务执行器直接运行等方式
         --&gt;
      &lt;task:scheduler id="scheduler" pool-size="10" /&gt;
      &lt;task:executor id="executor" keep-alive="3600" pool-size="100-200"
                     queue-capacity="500" rejection-policy="CALLER_RUNS" /&gt;
      &lt;task:annotation-driven executor="executor" scheduler="scheduler" /&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>I don't know where is the issue.</p>