The processing instruction target matching "[xX][mM][lL]" is not allowed

今天在做XML解析的时候,总是给我报 The processing instruction target matching "[xX][mM][lL]" is not allowedXML Parsing Error: XML or text declaration not at start of entity

错误,后来查了下讲大概意思是android中解析的时候xml文件格式问题。

文件的最前端 即<?xml version="1.0" encoding="UTF-8"?>前面不能有空格。

删了空格即好。

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念