in

The ORM Foundation

Get the facts!

Corrupt ORM file

Last post 02-03-2010 17:58 by JimLudden. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-02-2010 14:27

    Corrupt ORM file

    When I try to load one of my ORM files (or the solution that uses that file) I get the following message:

    Cannot load '...\IT_Management.orm':'.', hexadecimal vaue 00x0, is an invalid character. Line 7454, position 1.

    When viewed as XML it indeed looks bad, but I'm not smart enough to fix it.

    Is there a simple way to recover at least some of my model?

    Jim Ludden
    Filed under: ,
  • 02-02-2010 17:32 In reply to

    Re: Corrupt ORM file

    Jim,

    The XML needs to be valid for NORMA to attempt to load the file.

    If you open this in the VS XML editor, then typing the less-than character (<) after the failure point will bring up an intellisense list with the close elements at the top. Generally, the best you can do is to match the close elements and see what is left.

    NORMA always saves to a temporary stream, then dumps the entirety of the stream to the output file after the save succeeds. This is meant to eliminate file corruption from within the tool. We also use the standard .NET XmlWriter classes for writing XML, so it is highly unlikely that the tool will write invalid XML.

    You can send me the file off line if you want me to see what I can salvage. I'm pretty familiar with the .orm XML.

     -Matt

  • 02-03-2010 17:58 In reply to

    Re: Corrupt ORM file

    Finding the problem with the XML was easy, but there is one line that starts with an 'invalid character' followed by some 55,000 spaces!

    I tried deleting that line, but clearly it replaced a lot of substance because I kept getting invalid references, removing those references, and after about five of these I started over.  That forced me to rethink the whole domain, and probably results in a better model, given what I've learned about the domain in the meantime!

     Jim

    Jim Ludden
Page 1 of 1 (3 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service