English 中文(简体)
页: 1
原标题:XML Illegal Attribute Value

我在java使用SAX教区读一些XML。 我给它带来了问题,并造成 par落。 这里的错误信息是:

11-18 10:25:37.290:W/System.err(3712):org.xml.sax.SAXParseException: 非法:“<”内属性价值(定位:START_TAG <question text=aut >@1:23 in java.io.InputStreamReader@4074c678)

我感觉到,我不喜欢在《XML》的扼杀中有一些超文本标签。 我认为,在引言中的任何东西都从辛迪加的角度受到忽视。 此外,在这里使用单一报价是否有效? 例如:

<quiz>
    <question text="<img src= //files/alex/hilltf.PNG  alt= hill  style= max-width:400px  />  is represented on map by cut. ">
        <answer text="1"/>
        <answer text="2" correct="true"/>
    </question>
</quiz>
最佳回答

错误信息是正确的。 <代码><必须是标签的开端,不能出现在座标内。 它必须改为<代码>&lt;。 我不认为引言是一个问题。

问题回答

您需要从<代码><内<>text属性价值。 既然XML使用“带”;而且“大体”是指标签,那么它就具有非法内容,除非在CDATA 标签上逃脱或封闭(这是对属性价值的选择)。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签