Upcoming Games


Full list
Add a game

Upcoming Events

No events to display

We are not planning any more in-person events until the COVID-19 situation has improved.

XML editing, how many of us edit it, how and new ideas

You are here: Home > Forum > General > Timetabling > XML editing, how many of us edit it, how and new ideas

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
Avatar
662 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
Avatar
124 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
Avatar
4568 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
Avatar
129 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
Avatar
2279 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.

It would be good if someone with XML expertise was willing (and allowed) to take this development forward.
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
Avatar
5501 posts
Online
clive in post 136657 said:
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.

It would be good if someone with XML expertise was willing (and allowed) to take this development forward.
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.
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.

[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:34 #136668
trolleybus
Avatar
109 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:38 #136677
postal
Avatar
4568 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:26 #136679
GeoffM
Avatar
5501 posts
Online
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
Avatar
662 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:02 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
Avatar
337 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