• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Need help remove Vulture from EnemyAnimalsDesert group

xxx73

Refugee
Hi

I'm trying to remove Vulture in EnemyAnimalsDesert group with using xpath. Since my xpath experience is like 0 I have not manged to do this correctly. This is what I have tried so far.

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert'][@entity name="animalZombieVulture']" />

</configs>
[/CODE]


Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert'] />
		<entity name="animalZombieVulture"/>

</configs>
What am I doing wrong, how should it look correctly?

 
HiI'm trying to remove Vulture in EnemyAnimalsDesert group with using xpath. Since my xpath experience is like 0 I have not manged to do this correctly. This is what I have tried so far.

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert'][@entity name="animalZombieVulture']" />

</configs>
[/CODE]
...

What am I doing wrong, how should it look correctly?

I would think it should be more like this:

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert']/entity[@name='animalZombieVulture']" />

</configs>
The @ notation is ONLY to denote attributes. "entitygroup" and "entity" are called elements, their parameters like "name" are called attributes.

You also used " once instead of ' in the first xpath. And the second xpath missed one ".
 
Last edited by a moderator:
I would think it should be more like this:

Code:
<configs>

<remove xpath="/entitygroups/entitygroup[@name='EnemyAnimalsDesert']/entity[@name='animalZombieVulture']" />

</configs>
[/CODE]

The @ notation is ONLY to denote attributes. "entitygroup" and "entity" are called elements, their parameters like "name" are called attributes.

You also used " once instead of ' in the first xpath. And the second xpath missed one ".

Thanks for your reply, and thank for your explanation, will try it later.
 
Last edited by a moderator:
Back
Top