Jump to content

Need help remove Vulture from EnemyAnimalsDesert group


xxx73

Recommended Posts

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.

 

<configs>

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

</configs>[/Code]

 

[Code]<configs>

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

</configs>[/Code]

 

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

Link to comment
Share on other sites

  • 2 weeks later...
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.

 

<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>[/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 ".

Link to comment
Share on other sites

I would think it should be more like this:

 

<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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...