Page 1 of 2
Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 8:54 am
by OlPaint
@ PapaXpress
I am trying to teach myself how to use SERZ.exe utility to edit the asset.bin file for locomotives or pieces of rolling stock. I have learned that you can "drag and drop" the .BIN file onto the serz utility icon and a .XML file is generated in the same directory as a decompiled .BIN file with the same name. Now the .XML file can be inspected and/or edited in an appropriate text editor. OK, now then, if you "drag and drop" the edited .XML file onto the serz utility, a new .BIN file is recompiled and it overwrites the old .BIN file in the directory. Well, I understand that that is how it should work. But my recompile operation is throwing a "Expected missing end tag" error. What am I missing?
DId I read somewhere that RSC has purposely broken the copy of SERZ.exe that is bundled with RailWorks4. So we are unable to edit their .BIN files. I am trying to change the asset name or change the coupler height of several assets.
OlPaint
Re: Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 10:18 am
by artimrj
Why not use RW Tools for your editting? I do not play with that serze thing I let RW Tools do all of that.
Re: Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 10:24 am
by PapaXpress
Yes, SERZ does have a bug where it cannot compile Kuju XML files over a certain size. Its been awhile, but I think that its around 2MB. If you are seeing this problem with much smaller files then perhaps you accidentally removed a part of the end tag. There are some nice tools out there to help with editing XML files. The three I perfer are:
1) RW_Tools (compress, decompress using SERZ)
2) Notepad++ (understands XML)
3) Internet Explorer (validates XML, but does not edit)
Since I have been working with XML professionally since it first came out I am very comfortable just using RW_Tools for all my work. Once you get the hang of reading it you will be able to spot mistakes easily.
Re: Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 4:26 pm
by Chacal
This error message may happen when dragging XML from Internet Explorer, because it changes the XML code.
Otherwise you may not have copied the whole file.
Like the others said, spare yourself the frustration and use RW-Tools.
Re: Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 4:54 pm
by PapaXpress
When did IE start mauling the XML?
Re: Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 7:04 pm
by Chacal
Years ago, when I was working with XML a lot, we noticed IE would suppress the "<?xml version="1.0" encoding="UTF-8"?>" tag on the screen, and sometimes the outermost pair of tags as well. Other times, after selecting the whole text in IE and copying it into a different app, the last end tag would be missing. The OP's "Expected missing end tag" error reminds me of that.
I don't now if IE still does that.
Re: Editing .BIN/.XML asset files

Posted:
Fri Mar 15, 2013 7:25 pm
by PapaXpress
That reminds me of when I was embedding transforms in the XML.
In any case I was only suggesting to use IE to validate the XML because its very good at pointing at where the error is.
Re: Editing .BIN/.XML asset files

Posted:
Sat Mar 16, 2013 1:22 am
by Chacal
Yes, I just tried and I'm impressed at the improvements.
Microsoft also offers the free Xml Notepad 2007, an editor which does applies xsl transforms and lets you enter xpath statements. I've used it in the past. Could be useful for advanced editing of blueprints.
Re: Editing .BIN/.XML asset files

Posted:
Sat Mar 16, 2013 2:35 am
by Bananarama
PapaXpress wrote:SERZ does have a bug where it cannot compile Kuju XML files over a certain size. Its been awhile, but I think that its around 2MB.
Large file conversion issues might mean something else entirely. I have no problem converting XML files in excess of 30Mb.
Re: Editing .BIN/.XML asset files

Posted:
Sat Mar 16, 2013 12:07 pm
by PapaXpress
Are you talking recently, or in the past? I am not pulling this out of thin air, it was covered very well over at UKTS some time ago.
Re: Editing .BIN/.XML asset files

Posted:
Sat Mar 16, 2013 11:22 pm
by OlPaint
@ PapaX
Here is the error 216 that I am getting now when I try to recompile the edited .XML file in RW_Tools to .BIN
Error 216.jpg
Does this give you a clue as to the cause? It is an "Expected Missing End Tag" error but how do I head it off?
OlPaint
Re: Editing .BIN/.XML asset files

Posted:
Sat Mar 16, 2013 11:44 pm
by PapaXpress
Unfortunately all it tells me is that somewhere in your XML you are missing an end tag.
The sad part is that RSC could give us better information. The good news is that until a couple months ago that error message didn't even tell us that the end tag was missing... so someone is listening. I guess we could put new support tickets in, but I am not sure how far that will go.
Have you loaded the XML in IE to see what it can find?
Re: Editing .BIN/.XML asset files

Posted:
Sun Mar 17, 2013 12:49 am
by Bananarama
PapaXpress wrote:Are you talking recently, or in the past? I am not pulling this out of thin air, it was covered very well over at UKTS some time ago.
I didn't think you were, but I did realize I was using an older copy of serz in my system folder. However, I just gave the latest one a try and it worked without issue on a large 36 Mb XML file.
Re: Editing .BIN/.XML asset files

Posted:
Sun Mar 17, 2013 12:56 am
by Bananarama
OlPaint wrote:Now the .XML file can be inspected and/or edited in an appropriate text editor.
By "appropriate", I'm assuming you're using something that is Unicode compatible like WordPad
and not Notepad, correct?
(Edit: I see Papa mentioned Notepad++, which I believe is Unicode compliant)
Re: Editing .BIN/.XML asset files

Posted:
Sun Mar 17, 2013 1:15 am
by Chacal
If IE doesn't show you the problem, post the edited xml file, I'll have a look at it.