`

The processing instruction target matching "[xX][mM][lL]" is n...

    博客分类:
  • XML
 
阅读更多

The processing instruction target matching "[xX][mM][lL]" is not allowed.
Exception:org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

这个异常解释为:xml文件不能被解析,一般出现这样的问题在于xml格式上,并且问题多出现在xml文件的头部。我就是出现了这个问题。昨天还可以正常运行的,今天来了就运行不了了,很奇怪,查看了下错误信息,找到了原因。这是因为我的xml文件头部有两行空行,第三行才开始写


<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">
的。

总结:<?xml version="1.0" encoding="UTF-8"?>前面不要有任何其他字符,如空格、回车、换行这些否则就会出现上面的异常。

分享到:
评论
2 楼 mousegod2008 2012-05-15  
javaAndNet 写道
[size=x-small]你说的不对,我也在做一个项目,我已经将其中的空格和回车符都删除了,但服务端还是报错,但我试了一下取出空格的方法,就ok了。
webservice接受的String,即使有回车、空格符,也就是必须过滤一下空格,就ok了。
[/size]

----这位兄台,你说的是另外一种情况,楼主的这种情况确实是对的,我刚刚报的错就是这个情况::<?xml version="1.0" encoding="UTF-8"?>前面有空格。
1 楼 javaAndNet 2012-05-14  
[size=x-small]你说的不对,我也在做一个项目,我已经将其中的空格和回车符都删除了,但服务端还是报错,但我试了一下取出空格的方法,就ok了。
webservice接受的String,即使有回车、空格符,也就是必须过滤一下空格,就ok了。
[/size]

相关推荐

    ti dsp tms2802芯片资料

    Describes the architecture, registers, and primary functions of the TMS320C28x CPU. 2.1 CPU Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....

    RH850F1L用户手册:软件

    2.3.3 Pausing a thread by executing the SNOOZE instruction.............................................15 2.4 Instruction Execution........................................................................

    Instruction Set Reference_intel 64

    It provides detailed information about the instructions from A to M, which is a subset of the entire instruction set available for these architectures. #### Detailed Explanation of Key Knowledge ...

    计算机组成教学课件:Chapter2 Machine Instruction.ppt

    In contrast, CISC architectures have a larger, more complex instruction set, allowing multiple operations within a single instruction. RISC processors generally have fewer but more powerful ...

    Intel IA-32 Instruction

    Intel IA-32 Intel JUMP It's for me to download. If anyone need .I'll approve it. It is just the JUMP Instruction

    Digital Signal Processing An Experimental Approach

    "Digital Signal Processing" is a mathematically rigorous but accessible treatment of digital signal processing that intertwines basic theoretical techniques with hands-on laboratory instruction....

    Python库 | instruction_graph-0.2.23.tar.gz

    资源分类:Python库 所属语言:Python 资源全名:instruction_graph-0.2.23.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    计算机组成与结构体系英文课件:Chapter5 Basic Processing Unit

    Chapter 5 of the "Basic Processing Unit" in the Computer Composition and Structure System delves into the core elements and functioning of a computer's central processing unit (CPU). The CPU, also ...

    Processing: An Introduction to Programming

    Given its origins, Processing enables a multimodal approach to programming instruction, well suited to students with interests in computer science or in the arts and humanities. The book uses ...

    Instruction Aircraft-Fighter Bomber MK.II

    Instruction Aircraft-Fighter Bomber MK.II 搭建图纸

    Intel Architecture Instruction Set Extensions Programming Reference-2013.7

    《Intel架构指令集扩展编程参考》是一份详尽的技术文档,由Intel公司在2013年发布,旨在为开发者提供Intel处理器架构下指令集扩展(Instruction Set Extensions, ISE)的深入理解和应用指导。这份文档不仅是对Intel...

    SmartCarII_5_1.rar_HCS12_Modified_freescale can_full chip simula

    It is set up for the selected CPU and target connection, but can be easily modified. Sample code for the following language(s) is at your disposal: - C The wizard has prepared CodeWarrior target(s) ...

    Domas-Breaking-The-x86-Instruction-Set-wp.pdf

    Domas-Breaking-The-x86-Instruction-Set-wp.pdf

    microarchitecture.pdf

    5.2 Instruction fetch........................................................................................................38 5.3 Instruction decoding..................................................

    Sherlock7264.rar

    each instruction in the Main subroutine is executed in sequence, from the top of the Program window to the bottom, and after the last instruction is executed, the sequence is repeated from the ...

    D3D render pipeline

    scribes issues that are important to applications but aren't strictly part of the graphics pipeline. Debugging strategies for applications are presented. Almost all Direct3D applications will be ...

    iOS.Programming.The.Big.Nerd.Ranch.Guide.5th.Edition.01

    The result is instruction that is relevant and useful. Throughout the book, the authors explain what's important and share their insights into the larger context of the iOS platform. You get a real ...

    lpc546xx恩智浦芯片用户手册

    The LPC546xx is a family of ARM Cortex-M4 based microcontrollers for embedded applications featuring a rich peripheral set with very low power consumption and enhanced debug features. The ARM Cortex-...

Global site tag (gtag.js) - Google Analytics