MrSamExcel
Board Regular
- Joined
- Apr 6, 2016
- Messages
- 51
- Office Version
- 365
- 2021
- Platform
- Windows
I have 82 XML files each named with a 3- or 4-letter code; each XML contains a field (or tag? I'm new to XML) called OBJECTIVE followed by text and a field called STRATEGY followed by text.
ex) ABC.xml contains CODE ="ABC"
OBJECTIVE [The objective is to win.] /OBJECTIVE
INVESTMENTSTRATEGY [The strategy is to not lose.] /INVESTMENTSTRATEGY
(actual XML has < and > symbols around the fields in CAPS above but I couldn't figure how to display those properly in the forum)
What is the most efficient way to edit the text in both of these fields for all files? Currently, my only option is to open each XML, manually copy new Objective text over the old Objective text and then do the same for Strategy text; this is painful and slow and asking for errors.
Can I somehow use EXCEL to make the changes by converting/linking to the XMLs? For example, I could more easily override the old text with new text in a spreadsheet with the resulting xlsx having a columns for File Name | Code | Objective | Strategy
But I'm not sure how I'd get this back into the individual XMLs. And when I try importing the XML into Excel it says "Invalid file reference. The path to the file is invalid, or one or more of the reference schemas could not be found." The XML editors I currently use are Notepad++ and Geany; perhaps there's different software that could accomplish this or link to Excel better?
Thanks for any suggestions.
ex) ABC.xml contains CODE ="ABC"
OBJECTIVE [The objective is to win.] /OBJECTIVE
INVESTMENTSTRATEGY [The strategy is to not lose.] /INVESTMENTSTRATEGY
(actual XML has < and > symbols around the fields in CAPS above but I couldn't figure how to display those properly in the forum)
What is the most efficient way to edit the text in both of these fields for all files? Currently, my only option is to open each XML, manually copy new Objective text over the old Objective text and then do the same for Strategy text; this is painful and slow and asking for errors.
Can I somehow use EXCEL to make the changes by converting/linking to the XMLs? For example, I could more easily override the old text with new text in a spreadsheet with the resulting xlsx having a columns for File Name | Code | Objective | Strategy
But I'm not sure how I'd get this back into the individual XMLs. And when I try importing the XML into Excel it says "Invalid file reference. The path to the file is invalid, or one or more of the reference schemas could not be found." The XML editors I currently use are Notepad++ and Geany; perhaps there's different software that could accomplish this or link to Excel better?
Thanks for any suggestions.
Last edited: