1.The markup in the document following the root element must be well-formed,
如:
String xmlString = "<?xml version='1.0' encoding='utf-8'?>"
我的问题是组装的xml,组节点后面没有加\n(回车)
改成:String xmlString = "<?xml version='1.0' encoding='utf-8'?>\n"
2.White space is required between the processing instruction target and data.
如: String xml="<?xmlversion='1.0' encoding='utf-8'?>"
这个是因为xml 与version 之间没有空格
改成:String xmlString = "<?xml version='1.0' encoding='utf-8'?>\n"