开发者

XML quotes within quotes

开发者 https://www.devze.com 2023-03-12 00:50 出处:网络
<add key=\"TAB_Home\" value=\"//*[@id=\"kmTabContainer_HomeTab\"]\"/> <add key=\"开发者_如何学PythonTAB_Home\" value=\'//*[@id=\"kmTabContainer_HomeTab\"]\'/>
 <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

精彩评论

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