Jump to content

Xpath help :(


Recommended Posts

Hey all, I'm attempting to remove the Loot class from all blocks.

 

<remove xpath="/blocks/block[contains(@name, a)]/property[contains(@name, Class and @value, Loot)]"/>


This is my latest attempt. I've tried a && in place of the and, and a few other methods. My first attempt was just to remove the class, but that also removed all other types of classes, so I'm trying to pin point just the ones with Loot. I've also tried just @value, Loot.. But it threw errors saying something can't be null.

Any help would be sweet. :) Ty

Link to comment
Share on other sites

6 hours ago, Telric said:

Hey all, I'm attempting to remove the Loot class from all blocks.

 



<remove xpath="/blocks/block[contains(@name, a)]/property[contains(@name, Class and @value, Loot)]"/>


This is my latest attempt. I've tried a && in place of the and, and a few other methods. My first attempt was just to remove the class, but that also removed all other types of classes, so I'm trying to pin point just the ones with Loot. I've also tried just @value, Loot.. But it threw errors saying something can't be null.

Any help would be sweet. :) Ty

 

Hi Telric

 

The line of code you put in is removing the blocks.
I don't know if this is the correct way, but you can check it out.
Regards

 

<set xpath="/blocks/block[contains(@name, 'cntWallOven')]/property[@name='Class']/@value"></set>

You can add this code in case it doesn't work just by removing Property Class.

<set xpath="/blocks/block[contains(@name, 'cntWallOven')]/property[@name='LootList']/@value"></set>

 

Edited by Gouki (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...