zztong
Hunter
Say you want to define something like a custom block with a name of "xyzTestBlock". Is there a way to determine if something with that name already exists, and then avoid declaring it again?
That is, don't do the following if it already exists:
<append xpath="/items">
<item name="xyzTestBlock" category="test">
<property name="Tags" value="fruit,vegetable"/>
<property name="Weight" value="12"/>
</item>
</append>
The web suggests lots of options (that don't seem very obvious) but I've no idea which XPATH we're using.
Oddly enough, I find myself wanting C Preprocessor Commands for conditional compilation.
That is, don't do the following if it already exists:
<append xpath="/items">
<item name="xyzTestBlock" category="test">
<property name="Tags" value="fruit,vegetable"/>
<property name="Weight" value="12"/>
</item>
</append>
The web suggests lots of options (that don't seem very obvious) but I've no idea which XPATH we're using.
Oddly enough, I find myself wanting C Preprocessor Commands for conditional compilation.