PDA

View Full Version : Replacing a single tag



Muwak
January 16th, 2017, 10:44
Hey folks,

i'm trying to do a small modification in a Ruleset by using an extension. The only purpose is changing a single Tag within a file but without cloning and replacing the whole content (which i don't have access to), but i know which tag to replace. The problem is: the tag is nested in some others and i don't want to replace the content of the rest

SO e.g. i have the following code:


<base>
<tag_with_mixed_content>
<content_to_keep>
Some Content here
</content_to_keep>
<CONTENT_TO REPLACE>
</CONTENT_TO REPLACE>
</tag_with_mixed_content>
</base>

Is there any way to to this via an extension WITHOUT knowing the exact content of <tag_with_mixed_content>?

Thanks for your help

damned
January 16th, 2017, 11:07
just ask me Muwak and Ill likely be able to tell you....

Muwak
January 16th, 2017, 11:14
Yes i know, but 'im already bothering you with all theses newbie-questions :)

And using you as my personal XML/LUA/FG-Coach would be kind of brazen...

But okay: short question: is it possible? You know which tag I mean, don't you :o


And thank you btw :)

damned
January 16th, 2017, 11:20
actually i dont remember which one... in 3.2.2 we are extending the translation capability so some of the window frames will also pick up translated names :)
let me know whuch one you are waiting on and ill post it...
sometimes you can tell from the db.xml but others you cant....

damned
January 16th, 2017, 11:20
ohhh this is the item formatted text field?

Muwak
January 16th, 2017, 11:29
Yea for once iths not a translation-thing, it already works 98% and is waiting in your Mailbox for approvement :)

Now i just wanted to extent functionality a little bit and replace <ft_columnh name="identified" /> with my custom-control as you told me.

But I got stuck when i tried to replace the tag. Simply screwed up the whole item-dialog because i either cleared the whole content (When trying to replace the single tag) ore messed that cool Weapon/Armor Stuff you implemented when i just overrode the whole thing with the old ruleset-file.