Forum Discussion

henil_shah's avatar
henil_shah
Contributor
7 years ago

XML files got corrupted

SoapUI got closed abruptly and corrupted all important xml files? What should I do now?

7 Replies

  • groovyguy's avatar
    groovyguy
    Champion Level 1

    I've had some luck with loading the XML file into notepad++. Notepad++ has an XML plugin that can check syntax and whatnot for you. You might be able to find and fix the corrupted parts. Definitely make a copy and work off of that, though, just in case. 

    • Debz's avatar
      Debz
      Contributor

      Hi, another cause of the file being corrupted that I encountered was when we were merging the project file at Git. Some tags were not closed properly after another person did a merge. Anyway, I agree with msiadak, sometimes you have to load it in Notepad++. It would also help if you have the following:

      • Pretty Print option enabled - so that it's easy to compare since this will display the codes line by line, making it more organized. In case another person changed it, you can easily compare based on the lines and tags modified.
      • The codes stored in a repository (Git or CVS), this way, when the project file gets corrupted, you can get back to the latest (or even previous ones) version of the code that was saved before it got corrupted. When you check the change log, there are also tools to compare the changes made to the previous version per line.
      • groovyguy's avatar
        groovyguy
        Champion Level 1

        Another feature I've made use of is that ReadyAPI can make backups of the projects before saving them. Sometimes this will give you an extra copy to play with. It should be an option in the Preferences menu. 

    • henil_shah's avatar
      henil_shah
      Contributor

      When I open from Notepad++ it says NULL all around the script

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        Unfortunately, unless you are comfortable and/or familiar enough with XML to try to rebuild the corrupted part of the XML project file, there may not be much you can do. Do you have a backup and/or repository you push to?

         

        I've gotten into the habit of committing at least once an hour and pushing at least the end of every day.