无法解析“&" [英] NOt able to parse "&"

查看:38
本文介绍了无法解析“&"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 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.

与号(&")需要写成 &放大器;或包含在 CDATA 部分

Ampersand ("&") needs to be written as & amp; or be contained in a CDATA section

查看关于如何在Objective中转义XML字符串的链接-C

这篇关于无法解析“&"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆