View Full Version : Any general problem with search/replace with device ID?
June 3rd, 2005, 02:59 PM
I'm trying to search/replace in my favourite XML editor, Peter's XML editor, and it usually works, but trying to replace all instances of "232" with "200" renders the file useless. Girder's unable to parse it. And I have tried using Device="232" as well, so it isn't because it's replacing too much. Anybody got an idea why this happens?
Edit: I have also tried a regular textbased editor called Ccy Text Editor that's supposed to work with XML, but I get the same problem.
June 3rd, 2005, 03:48 PM
What happens if you just save the file from one of those editors without making any significant changes?
June 3rd, 2005, 03:59 PM
I have done search/replace of tons of LUA code (like strsub to string.sub), and that gives me no problems. I just now expoted a very small group, and first changed something else. No problem. Then I changed the Device="232" to 200, and it won't import. This time the error is "A GMLE with the same identifier is opened already!" - even though I have closed all GML's and restarted Girder. There is something weird about chancing those devices.
Oh, and I get the same problem with Girder 3.3, it seems...
June 3rd, 2005, 04:03 PM
I suspect it's something in the <Binary></Binary> that's causing the problem in that case.
June 3rd, 2005, 04:08 PM
Eh? :oops: Anyway, do you think it's possible to get around it? A couple of hundred event strings would be a lot easier to change with a simple search replace than one by one...
June 3rd, 2005, 04:33 PM
Probably not. We'll have to wait for Ron to get back for a definitive answer though.
June 3rd, 2005, 04:35 PM
I was afraid of that... Anyway, I feel sorry for the guy...when he's back from his holiday he's gonna need another one pretty soon! :wink:
June 3rd, 2005, 04:42 PM
try using the xml editor to delete all references to binary. this will force girder to recompile the scripots.
June 3rd, 2005, 04:49 PM
Wouldn't that mean that I'm doing almost as much work there as I would do changingthe event IDs manually? Also, I tried to remove all the binary stuff (between <Binary Encoding="Base64"> and </Binary>), but that didn't help. And when I open the file after again in the XML editor after an attempted import I see "An invalid character was found in text conent." And there's four bars in front of "<?xml version =".
June 3rd, 2005, 06:06 PM
Thanks for the tip about the binaries, though! Now it's a lot easier to add more zones to the playlist selecter, since I won't have to manually re-compile everything. I made a template without binaries, and it all goes a lot faster! :D Pure search & replace, and it works out of the XML editor.
June 4th, 2005, 04:56 AM
OK, this is positively weird: I took the whole huge GML and opened it in the XML editor. Then I searched for 32, and every time that led me to Device="232" I replaced 32 with 00 (32 was already highlighted, so it only took around 10 minutes for maybe 200 event strings). And that works perfectly! Doing the exact same thing with search/replace, and the file is messed up. So what's the difference between these two methods? I have no idea. But at least even the manual replace in the XML editor is a lot faster than changing the Event IDs manually in Girder. :roll:
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.