Swapping Stock with RW_Tools - Update

Help and support forum for Mike Simpson's RW Tools

Moderator: mikesimpson

Swapping Stock with RW_Tools - Update

Unread postby mikesimpson » Sun Jan 20, 2019 6:08 pm

Problems with swapping stock -
Thanks to assistance from a user on uktrainsim, by comparing the Scenario.bin files for the Scenarios where 'SWAP' worked with those which did not, I discovered the following:-

Those which worked began:-
<?xml version="1.0" encoding="utf-8"?>
<cRecordSet xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0" d:id="-1922917928">
<Record>
<cConsist d:id="1391892688">

Whereas those which failed began:-
<?xml version="1.0" encoding="utf-8"?>
<cRecordSet xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
<Record>
<cConsist>

RW_Tools was searching for "<cConsist " with the space before the final quotes which of course did not exist hence the Error #5

I have now changed the code for all these options and hopefully all will be well from now on, I will upload the new version asap. The problem only seems to have occurred where the first consist in the Scenario.bin file was a 'Loose consist' and these consists do not have an id number.

Mike
mikesimpson
 
Posts: 364
Joined: Sun Feb 15, 2009 4:49 pm

Re: Swapping Stock with RW_Tools - Update

Unread postby Chacal » Mon Jan 21, 2019 1:52 am

Mike, just curious, are you processing XML files as text files or are you using an XML parser?
Over the hill and gathering speed
Chacal
Site Admin
 
Posts: 6464
Joined: Tue Jul 05, 2011 1:11 pm
Location: Quebec, Canada

Re: Swapping Stock with RW_Tools - Update

Unread postby mikesimpson » Mon Jan 21, 2019 5:03 pm

Chacal wrote:Mike, just curious, are you processing XML files as text files or are you using an XML parser?


Yes, I am processing as text files (and running them through a routine to check for accented letters, quotes etc.

I tried with an .xml parser but DTG don't use the same format for .xml as Microsoft do with their parsers.

Mike
mikesimpson
 
Posts: 364
Joined: Sun Feb 15, 2009 4:49 pm


Return to RW Tools

Who is online

Users browsing this forum: No registered users and 1 guest