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

Xpath help :(

Telric

Scavenger
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

 
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

Code:
<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>
 
Last edited by a moderator:
Yeah, i was tryin to get all of them without having to go through the blocks.xml and name each container. But that looks like what i might have to do. Thanks!

 
Back
Top