开发者

Can FlexNativeMenu with a e4x XML dataProvider have <> characters in its attributes?

开发者 https://www.devze.com 2023-03-16 02:20 出处:网络
As the question states, I get XML parser failure: Unterminated attribute whenever I try to use the angle brack开发者_JS百科ets as part of a value of one of my attributes.For example all cause XML erro

As the question states, I get XML parser failure: Unterminated attribute whenever I try to use the angle brack开发者_JS百科ets as part of a value of one of my attributes. For example all cause XML errors:

<menuitem label="<em>"/>
<menuitem label="&lt;em&gt;"/>
<menuitem label="&#60;em&#62;"/>

Is there a way to include angle brackets in these menu items when using it with a FlexNativeMenu in Flex 4?


I'd try setting the label in ActionScript:

menuItem.label = '&lt;em&gt;';

If you're intent on doing this in MXML; I would try an approach like this, using the cdata declaration to escape things:

<Menuitem>
 <label><![CDATA[<em>]]></label>
</Menuitem>
0

精彩评论

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