无法解析“&" [英] NOt able to parse "&"
问题描述
我的 xml 由几种不同语言的单词、拉丁语单词等组成.能够解析这些拉丁字符,除了我不能解析只有&"
My xml consist of words in few different language, Latin words etc. am able to parse these Latin characters and all except the fact that I am not able parse only "&"
这就是我得到的@gdb
This is what I am getting @gdb
实体:第 223 行:解析器错误:>xmlParseEntityRef: 没有名字 Ull >现在永远是我的 4 &4ever.Ull >永远是我的 4 你是我的宝贝.Ull
Entity: line 223: parser error : > xmlParseEntityRef: no name Ull > always be mine 4 now & 4ever.Ull > always be mine 4 u r my treasure.Ull
推荐答案
& 符号被视为特殊字符,因为它是一个特殊字符.& 符号是实体的开始.
The ampersand is treated as a special character because it is a special character. Ampersand is the start of an entity.
Ampersand ("&") needs to be written as & amp; or be contained in a CDATA section
查看关于如何在Objective中转义XML字符串的链接-C
这篇关于无法解析“&"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!