---
title: "org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-fo"
author: "fgh2011"
date: "2012-04-13T11:25:00Z"
tags: []
categories: ["编程语言"]
slug: "org-xml-sax-saxparseexception-the-markup-in-the-document-preceding-the-root-element-must-be-well-fo"
draft: false
lastmod: "2012-04-28T13:47:04Z"
id: 1503338
url: "https://fgh2011.iteye.com/blog/1503338"
---

错误原因：

配置文件中&lt;?xml version="1.0" encoding="UTF-8"?&gt;  
&lt;! DOCTYPE sqlMapConfig  
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"  
"http://www.ibatis.com/dtd/sql-map-config-2.dtd" &gt;

&lt;! DOCTYPE 中间多个空格