有关XML的疑问 [英] Doubts regarding XML

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

问题描述

大家好,

我的疑问是,我们可以在XML节点的文本部分(例如"2/23/1988")中使用"/"吗?我需要将XML发送到服务器.该XML包含一个"DOB"节点,该节点的文本部分是日期字符串,例如"2/23/1988".我们可以使用以上格式吗?

Hi All,

My doubt is, can we use ''/'' inside the text part of an XML node like "2/23/1988". I need to send an XML to the server. That XML contains a "DOB" node and text part of the node is date string like "2/23/1988". Can we use the above format. Is there any problem....?

<DOB>2-23-1988</DOB>

推荐答案

是的,您可以将几乎所有内容都用作xml标记的内部文本.除非您的文字中没有</".您无需在xml代码中转义"/".为了进行确认,您可以在遵循W3C规范的任何xml编辑器中尝试使用
Yes, you can use pretty much everything as inner text of the xml tag. unless you you are not having something "</" in your text. you need not escape ''/'' it in your xml code. For confirmation you may try that out in any xml editor which follows W3C specifications


是的,可以在XML文件中使用"/"作为内部文本.
yes, you can use ''/'' as inner text, in XML file.


这篇关于有关XML的疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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