English 中文(简体)
Xml特殊性
原标题:parsing special characters in xml

i) 反应xml,内线如下:

<Description>DVD +/- RW Drive (read/write CD & DVD)</Description>

when try to read this xml response and load it to xml document it is throwing error as An error occurred while parsing EntityName.

i) 更改了上述线。

<Description>DVD +/- RW Drive (read/write CD and DVD)</Description>

still the error exists can any one guide me where i have gone wrong

问题回答

you can use Apache Commons Lang class StringEscapeUtils escapeXML method handle to non-ASCII characters in XML Apache Commons

页: 1

你可以将XML作为XPL处理。 XPL的结构与XML相同,唯一的区别是,主食允许在文字领域具有特殊性。 您可以自行使用XPL程序,或作为加工前程序者,成为有效的XML(即为你和其他人改变你的特性)。 甚至最近有一篇文章解释了如何利用 Java来消除预处理(SAX)的性能成本。 rel=“nofollow”>,eXtensible Process Language





相关问题
how to represent it in dtd?

I have two element action and guid. guid is a required field when action is add. but when action is del it will not appear in file. How to represent this in dtd ?

.Net application configuration add xml-data

I need to add xml-content to my application configuration file. Is there a way to add it directly to the appSettings section or do I need to implement a configSection? Is it possible to add the xml ...

XStream serializing collections

I have a class structure that I would like to serialize with Xstream. The root class contains a collection of other objects (of varying types). I would like to only serialize part of the objects that ...

MS Word splits words in its XML format

I have a Word 2003 document saved as a XML in WordProcessingML format. It contains few placeholders which will be dynamically replaced by an appropriate content. But, the problem is that Word ...

Merging an XML file with a list of changes

I have two XML files that are generated by another application I have no control over. The first is a settings file, and the second is a list of changes that should be applied to the first. Main ...

How do I check if a node has no siblings?

I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here s what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else ...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

热门标签