• Mods are now organized as resources. Use the Mods link above to browse for or submit a mod, tool, or prefab.

    The TFP Official Modding Forum Policy establishes the rules and guidelines for mod creators and mod users.

[TOOLS]Online XPATH tester tool

pahbi

Refugee
If your like me, and want to make mods, but are useless with xml and xpath, this online tool can help unravel xpaths.

https://codebeautify.org/Xpath-Tester

You can paste an xml file (items.xml for example) into the webpage, then experiment with different xpath expressions until you get to the value you are looking for.

- P

 
Last edited by a moderator:
I use this website as well, so I recommend it.

One thing I do want to point out is that all these onine generators love to use index values in their xpath:

Code:
xpath="/items/item[4]"
This points to the 4th item, regardless of what it is. If something shifts the items, then the xpath is broken. Always review these xpath and remove the index values where you can, and add in [@name=''] to make it more precise.

 
I can't get it to work?

Edit:

Nevermind, I worked it out

 
Last edited by a moderator:
Back
Top