开发者

APOSTROPHE inside xml element value

开发者 https://www.devze.com 2023-02-17 19:28 出处:网络
How Should I write an elements value inside an XML which contains apostrophe? Is there an escape sequence for the same?

How Should I write an elements value inside an XML which contains apostrophe? Is there an escape sequence for the same?

I am dynamically getting an xml, something like this from a sql Select. Now in this case emp_name O''DELL, SEAN in itself contains apostrophe. How should I be getting emp_name so a proper xml could be formed?

&l开发者_开发百科t;Result type="Benefit" emp_id='332' emp_name='O''DELL, SEAN '/>

Thanks Guys.


Use ' in place of '. Check this.

0

精彩评论

暂无评论...
验证码 换一张
取 消