in an application I'm using a config-file in which i开发者_JAVA技巧'd like also to use '&&'.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<use-case id="customer">
<precondition evaluate="!empty customer && !empty product" />
<menu-item id="customer" label="Kunde" />
</use-case>
With this code I'm getting an validation error owing to the '&&' ...
Is there any solution to express this?
THX
<?xml version="1.0" encoding="ISO-8859-1" ?>
<use-case id="customer">
<precondition evaluate="!empty customer && !empty product" />
<menu-item id="customer" label="Kunde" />
</use-case>
Being able to shove almost any old rubbish into an XML file is a job for CDATA, something like:
<precondition name="evaluate">
<![CDATA[!empty customer && !empty product]]>
</precondition>
Then you don't have to worry about anything other than the ]]
possibility.
精彩评论