Add a line to an XML file
Solved
marceletienne
Posted messages
23
Status
Member
-
jordane45 Posted messages 30426 Registration date Status Moderator Last intervention -
jordane45 Posted messages 30426 Registration date Status Moderator Last intervention -
Hello everyone,
I'm not sure if I'm in the right section, if so, I apologize.
Otherwise, here is my problem:
I don't know this language, but I tried to insert a command line into an XML file using the "XML copy Editor" application, with no result.
The file looks like this:
<Config Version="20151004">
<System Height="1080" Maximized="true" Width="1920" Windowed="false" />
<MediaPath Path="Media.zip" />
<MediaPath Path="_dlc_valley.zip" />
<MediaPath Path="_dlc_ridge.zip" />
<MediaPath Path="_dlc_usa.zip" />
<MediaPath Path="_dlc_oldtimers.zip" />
<MediaPath DoPrepend="true" MountPoint="_t/" Path="TextureCache.zip" />
<MediaPath DoPrepend="true" MountPoint="_m/" Path="MeshCache.zip" />
</Config>
And I would like to insert the line: " <MediaPath Path="Volcano.zip" /> " after the line containing
"_dcl_oldtimers.zip"
After many attempts, I give up and turn to your knowledge to solve my problem as well as a few explanations.
Thank you.
Best regards.
Configuration: Windows / Chrome 87.0.4280.88
I'm not sure if I'm in the right section, if so, I apologize.
Otherwise, here is my problem:
I don't know this language, but I tried to insert a command line into an XML file using the "XML copy Editor" application, with no result.
The file looks like this:
<Config Version="20151004">
<System Height="1080" Maximized="true" Width="1920" Windowed="false" />
<MediaPath Path="Media.zip" />
<MediaPath Path="_dlc_valley.zip" />
<MediaPath Path="_dlc_ridge.zip" />
<MediaPath Path="_dlc_usa.zip" />
<MediaPath Path="_dlc_oldtimers.zip" />
<MediaPath DoPrepend="true" MountPoint="_t/" Path="TextureCache.zip" />
<MediaPath DoPrepend="true" MountPoint="_m/" Path="MeshCache.zip" />
</Config>
And I would like to insert the line: " <MediaPath Path="Volcano.zip" /> " after the line containing
"_dcl_oldtimers.zip"
After many attempts, I give up and turn to your knowledge to solve my problem as well as a few explanations.
Thank you.
Best regards.
Configuration: Windows / Chrome 87.0.4280.88
2 answers
-
Hello
To edit an XML file, any text editor is enough .. (notepad, notepad++ ...or any other word processor!).
However, I don't see the connection with the VB or VBA language (chosen forum topic)
You also don't tell us about the difficulties encountered... what have you tried? Why do you think it is not "good"?
--
Best regards,
Jordane -
Hello,
Thank you very much for your quick response, which helped me solve the problem with Notepad++ that I installed.
As for the language and the theme of the chosen forum, not knowing either one or the other, nor Java, which some sites referred to concerning the XML format, I picked this theme by chance.
The problem was that with the applications mentioned in my message, I could not insert a command line, whereas this was done simply and quickly with Notepad.
The modified config.xml file is now working perfectly.
Thanks again.
Best regards.