开发者

XML quotes within quotes

 <add key="TAB_Home" value="//*[@id="kmTabContainer_HomeTab"]"/>

 <add key="开发者_如何学PythonTAB_Home" value='//*[@id="kmTabContainer_HomeTab"]'/>

The above is the code from my appConfig file. How to format quotes inside quotes in XML? When I do the first one, it says Missing Required White Space.

The second one gives me expected '>'


Use &apos; to represent a single quote in an attribute value delimited by single quotes.

Use &quot; to represent a double quote in an attribute value delimited by double quotes.


You encode them using &quot;:

<add key="TAB_Home" value="//*[@id=&quot;kmTabContainer_HomeTab&quot;]"/>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜