• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Trying to make a console app to speed up writing xpath code for modding 7 Days to Die (2 Viewers)

penguin84

Newcomer
Joined
Sep 6, 2022
Messages
1
Reaction score
0
Age
38
I've been working on a substantial mod for 7 Days to Die and in order to do so, I must make changes using xpath. The most common is the <set> tag. For example:
XML:
<set xpath="/items/item[@name='itemName']/property [@tag='tagname']@value">123</set>
I thought about just asking for each major piece then inserting them is a pre-formated string, however, some values that may need changed can be several sub-nodes deep. Any suggestions on how to approach this effectively? Maybe have the user write out the path -minus the extraneous symbols- then have it stored in a table where the program can step through it and insert the proper symbols where there is white space? For some reason, I just can't seem to wrap my head around this program. Any ideas would be greatly appreciated.
 
Top