Page 1 of 1
XML editing, how many of us edit it, how and new ideas 21/01/2021 at 12:02 #136649 | |
bill_gensheet
1413 posts |
Having been doing a 'ground up' timetable and needing various bulk edits I have had to get my head around editing the xml file rather than using the SimSig editor. A bit more complicated than old convdata but following the same lines. So as it says, how many do edit / write the xml's ? Do you edit in text editor or use spreadsheets to automate things ? Bill Last edited: 21/01/2021 at 19:06 by bill_gensheet Reason: typo Log in to reply |
XML editing, how many of us edit it, how and new ideas 21/01/2021 at 12:29 #136650 | |
AlexRail575
136 posts |
I do it programmatically via a couple of scripts and a database; i.e. see my November 11 timetables for the Western region (available in the Download section) and this thread if you want a wee bit more info on the xml format.
Log in to reply The following user said thank you: DonRiver |
XML editing, how many of us edit it, how and new ideas 21/01/2021 at 14:24 #136651 | |
postal
5264 posts |
At one stage there was an XML editor for SimSig TTs under development (I have two variants archived away dated 2012 and 2016 on my system) but unfortunately the TT format has moved on and both versions show an error message and can't load XML files extracted from current timetables. It would be good if someone with XML expertise was willing (and allowed) to take this development forward. “In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe Log in to reply |
XML editing, how many of us edit it, how and new ideas 21/01/2021 at 15:29 #136652 | |
danners430
135 posts |
I can't speak for SimSig XMLs specifically, but I regularly work with and interpret XMLs at work. To read them, I use Excel (select "read only document" when it asks you), and use a macro to make the file easily readable (format it as a table). For editing I use Notepad++ set to interpret XML.
Log in to reply |
XML editing, how many of us edit it, how and new ideas 21/01/2021 at 16:42 #136657 | |
clive
2789 posts |
postal in post 136651 said:At one stage there was an XML editor for SimSig TTs under development (I have two variants archived away dated 2012 and 2016 on my system) but unfortunately the TT format has moved on and both versions show an error message and can't load XML files extracted from current timetables.Firstly, "allowed" isn't an issue because we can't stop anyone writing a program to work on any file. The most we can do is to not bless it. There are a range of XML editors out there. There are also plenty of libraries to convert XML to a useful internal representation and vice versa. Therefore writing a timetable XML editor should be simple enough. A WTT file is a ZIP file containing two XML files, one of which is an extract from the other. The meanings of everything in there should be obvious to anyone familiar with XML. The only thing to watch is that the library used by the loader is very unforgiving of bad XML. There might be problems with keeping up to date with new elements as they are added, but provided that you just remember them and save them again, things should just work. In general the Loader always has a sensible default for each element. Anyone who wants to try it, please go ahead. Log in to reply |
XML editing, how many of us edit it, how and new ideas 21/01/2021 at 17:14 #136660 | |
GeoffM
6376 posts |
clive in post 136657 said:postal in post 136651 said:I assumed "allowed" in this context was about taking the existing program(s) John mentioned and modifying it - I don't know who the author is, nor have I seen the program itself to the best of my knowledge.At one stage there was an XML editor for SimSig TTs under development (I have two variants archived away dated 2012 and 2016 on my system) but unfortunately the TT format has moved on and both versions show an error message and can't load XML files extracted from current timetables.Firstly, "allowed" isn't an issue because we can't stop anyone writing a program to work on any file. The most we can do is to not bless it. [Edit] It's been pointed out Postal may be referring to a program I wrote a long time ago which took CIF files and produced XML in the format for *importing* into the Loader - not the WTT format that you get in the selection window when starting a sim. If that is the program being referred to then it's unsuitable for editing WTT files (and not surprising that it comes up with errors). SimSig Boss Last edited: 21/01/2021 at 17:21 by GeoffM Reason: None given Log in to reply |
XML editing, how many of us edit it, how and new ideas 22/01/2021 at 10:35 #136668 | |
trolleybus
150 posts |
In the days when I had to edit (non-Simsig) XML I used Microsoft's XMLNotepad. It's free and does the job. https://microsoft.github.io/XmlNotepad/#install/ Log in to reply |
XML editing, how many of us edit it, how and new ideas 22/01/2021 at 15:39 #136677 | |
postal
5264 posts |
It's a long time ago but my recollection (which could be faulty) was that a TT window was presented containing the same elements as the F4 TT window along with one or two extras such as 7 check boxes for the days of the week. I didn't have any CiF files to load into the app but I think it was possible to enter data manually in the same way as entering to the F4 window when writing a TT. All subject to any recollections not being the product of a fevered imagination. “In life, there is always someone out there, who won’t like you, for whatever reason, don’t let the insecurities in their lives affect yours.” – Rashida Rowe Last edited: 22/01/2021 at 15:54 by postal Reason: None given Log in to reply |
XML editing, how many of us edit it, how and new ideas 22/01/2021 at 16:27 #136679 | |
GeoffM
6376 posts |
If you could enter the days of week then most likely it was indeed my CIF to XML tool - not the WTT format. This tool is obsolete and not recommended, for those whose ears have just picked up. It does not import all the information from a CIF that we currently use (ie data loss). SimSig Boss Log in to reply The following user said thank you: postal |
XML editing, how many of us edit it, how and new ideas 22/01/2021 at 16:40 #136682 | |
bill_gensheet
1413 posts |
All interesting comments thanks. The things I have been trying out using spreadsheet number & string maths are: Amending existing timetables eg to change Greenloaning entries to be Blackford entries on CSCOT So the spreadsheet finds the Greenloaning entries, changes Greenloaning to a pass time and creates a Blackford entry with the Blackford time to suit the train speed. Then the same for the exits Adding a UID of the TD+00 for all trains that do not have a UID Adding a UID of the TD+01 and TD+02 for ones that exit and re-enter Fixing timing errors eg add a minute to all up trains at a passing point that have come from xxxxx. For new timetables: Bulk generating rules to pattern eg 2A01 must enter 10 minutes after 2A00 leaves .... up to 2A41 must enter 10 minutes after 2A40 leaves Next is to bulk generate a whole 'type' timetable from one train created in F4. Just enter the desired TD and the time at one station, spreadsheet does the rest. Useful for the likes of half hourly (ish) Dunblane - Edinburghs or Welwyn - Kings Cross locals Bill Last edited: 22/01/2021 at 17:03 by bill_gensheet Reason: None given Log in to reply |
XML editing, how many of us edit it, how and new ideas 24/01/2021 at 14:29 #136734 | |
Chrisrail
384 posts |
I tend to use Notepad ++ (free and a very useful tool as well) which edits xml files fine . I use it to merge xml files and edit. Took getting my head getting around what to leave in and take out but works fine
Log in to reply |
XML editing, how many of us edit it, how and new ideas 03/01/2023 at 03:03 #149931 | |
DonRiver
166 posts |
Is there any great trick to unzipping / rezipping a .wtt? 1. create .WTT using Luke Briner's importer 2. load into SimSig (no error) 3. in F4 editor, make minor tweaks 4. save timetable as new .WTT 5. change extension to .zip 6. "Extract all" to folder (contains SavedTimetable.xml and TimetableHeader.xml) 7. Without making any changes, "Send to" and "Compressed (zipped) folder" 8. Start New Simulation - but the second version of the timetable is not visible (vs if you put two copies of a .wtt into the Timetables folder the timetable appears twice and if you look at the end of the description you can see the different filenames) (named for the one in Tasmania, not in Russia) Log in to reply |
XML editing, how many of us edit it, how and new ideas 03/01/2023 at 06:11 #149933 | |
y10g9
895 posts |
DonRiver in post 149931 said:Is there any great trick to unzipping / rezipping a .wtt?Step 7.5 return extension to .wtt Log in to reply |
XML editing, how many of us edit it, how and new ideas 03/01/2023 at 06:30 #149934 | |
DonRiver
166 posts |
Thanks, yes, I am doing that, but it doesn't make a difference - it recognises valid .wtt files no matter the extension, and it ignores my rezipped timetables no matter if I give a .wtt extension or not
(named for the one in Tasmania, not in Russia) Log in to reply |
XML editing, how many of us edit it, how and new ideas 03/01/2023 at 07:33 #149935 | |
Meld
1111 posts |
If you use 7zip you can right click the WTT file - show more options in win11 - in the 7zip dropdown you can then open archive. No need for changing file extensions Copy the timetable xml to desktop, make changes & save the replace this file back into the archive Passed the age to be doing 'Spoon Feeding' !!! Last edited: 03/01/2023 at 08:19 by Meld Reason: None given Log in to reply The following user said thank you: DonRiver |