I need help for modify this xml file:
(image for correct view)
I want modify: RegUserName="" with ciao
You've cut the image to show only part of the file, so I can't say for sure, however, if you adjust your XPath something like the following, it might work, although depending on the layout of the XML file you may need to be even more specific.:
No problem, try this:
When working with XML writing, it may be helpful to review some of the other apps using it.
Scribus Portable, for example, have fairly complex XPath(s) being used in FileWrite5 & FileWrite7 for XML text and XML attribute respectively.
Some others that use it, with varying degrees of complexity, include FreeCol Portable, Inkscape Portable & LMMS Portable.
Hope that helps!
Thanks for your attention.
The online manual is not complete for dealing with XLM.
Just to understand:
/config is the root of xlm
/common_setting is the branch below
[@CurrentSkin="103"] is... the last value on the right of common_ setting branch (the original xlm have many values in common setting branch)
/Generic is the branch that contains the value to be changed.
If [@CurrentSkin="103"] was a value variable, eg. the position of a window on the monitor as you would to modify it, given that it can not be known at the time of programming?
P.S. Sorry for my bad english
No more help?
Sorry you didn't get everything answered when you were here previously.
Did you figure out a solution to your problem? or are you still facing this issue?
I'd just like to build on this a little. I'm trying to modify an XML files as well on the fly. The file is moved by the launcher from the data directory to the app directory. I'm having issues getting the launcher to modify the file because I'm not sure if the code is wrong or if I'm modifying it too late (after it is moved to the app directory). Below is a snippet of the XML file that I'm trying to modify and the code I'm using to do it. Any help would be appreciated.
<Settings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OutlookGoogleCalendarSync">
Your current code changes the "value" attribute of the "HideSplashScreen" XML node, thus making your settings.xml look like this:
It seems doubtful to me that you intended for that to happen...
If you are instead wanting to set the contents of
/Settings/HideSplashScreento "true", your
[FileWrite1]:Typeshould be using
XML textinstead of
XML attribute, and the
[FileWrite1]:Attributeis no longer needed, thus your FileWrite should look like this:
Finally, don't forget to set
[Activate]:XML=true, then re-run the PortableApps.com Launcher Generator if you haven't already done so.
On a side note, I don't see a good example of how
[FileWriteN]:Type=XML textworks in the PAL manual. Perhaps we should add one to help others with this down the line.
That worked perfectly, thanks for your help. I do think the XML section in the PAL manual needs some work. I tried several different things before I posted trying to figure out how to use the limited information in the manual to get things to work. At a minimum I think there should be examples in the manual for the different formats of XML files, that's where my confusion was coming from.