Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Sat Jun 21, 2008 11:45 am   

[2.28] XML editing bungled
 
I wanted to search-and-replace part of my regex patterns. I figured the easiest way to do this would be to copy the XML to my own editor (which just so happens to be SciTE, based on the same basic editor control as the PE), do the replacing there, and then paste the XML back into the PE to be saved. Well, it didn't turn out so well.

1. Highlighted just under 3,000 lines of XML and copied it to my text editor.
2. Did my search-and-replace operation.
3. Copied text from my editor and replaced all XML in the PE (did NOT paste two copies, I highlighted the text in the PE and replaced it when I pasted).
4. (Bug 1) Tried to save, and got an error about line 2566, column 19, which basically had the "empty class" bug thing again and looked just like this:
Code:
<class name="""" id="1455"/>

Note that this was not created by me or any of my scripts. It was present in the XML before I copied/pasted it, and it re-appeared all on its own later.
5. I removed the empty class error line and successfully saved the XML.
6. (Bug 2) The saving of the replaced XML did not replace the settings I was attempting to edit. Instead, I ended up with two copies of everything. Thinking this might be a PE display glitch, I closed it and re-opened it. I discovered that all the duplicate copies of everything was disowned and sitting at the "root" level (outside of any module) in my main Lusternia session package. Not good!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jun 23, 2008 5:14 pm   
 
Larkin, can you email me the *.PKG file that is adding the blank class to the XML export text?

Also, check the XML to see if anything has the "copy=true" attribute in it. This is added when you right-click and select Copy from a setting to allow CMUD to create a duplicate instead of just overwriting the existing setting. If you want to overwrite the existing setting, remove the copy=true attributes. But in the Export XML it shouldn't be adding that to anything.

But I'll need both the files and the exact search-and-replace that you did in order to reproduce this. XML issues are *very* data dependent so without the data I can't do much with this. I just tried doing some basic editing on my own package and didn't run into any problems like this.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net