Results 1 to 1 of 1

Thread: Xml.Serialization.XmlSerializer Buggy?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2003
    Location
    Australia
    Posts
    252

    Xml.Serialization.XmlSerializer Buggy?

    Hi Guys,

    Okay this is the weirdest thing happened to me. I am serializing a class and I can load & save settings most of the time. Some times Deserialization fails all of a sudden. When finding out the cause: I just saw it is adding irrelevant charactors to the file.

    For example:

    <?xml version="1.0"?>
    <Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <mShowFileSize>true</mShowFileSize>
    <mShowFilePath>true</mShowFilePath>
    <mShowFolderPath>false</mShowFolderPath>
    <mListType>Bullets</mListType>
    <mCssFilePath>H:\Users\McoreD\My Documents\My Received Files\HotRod2.css</mCssFilePath>
    <FolderList>
    <anyType xsi:type="xsd:string">G:\Downloads</anyType>
    <anyType xsi:type="xsd:string">G:\Uploads</anyType>
    <anyType xsi:type="xsd:string">H:\eBooks</anyType>
    <anyType xsi:type="xsd:string">F:\Movies</anyType>
    <anyType xsi:type="xsd:string">G:\CORE</anyType>
    <anyType xsi:type="xsd:string">F:\Music</anyType>
    </FolderList>
    <IndexFileName>index</IndexFileName>
    <IndexFileExtension>.html</IndexFileExtension>
    <isIndexFileInSameDir>true</isIndexFileInSameDir>
    <isIndexFileInOneDir>true</isIndexFileInOneDir>
    <isRemoveTreeBranches>false</isRemoveTreeBranches>
    <isMergeFiles>true</isMergeFiles>
    <isAscii>true</isAscii>
    <isAddFiles>true</isAddFiles>
    <OutputDir>G:\</OutputDir>
    </Config>>

    Notice the extra ">" here in the last line. This makes the deserialization fail on the next run.

    Another time it was

    </Config>Config>

    Is this a bug in Xml.Serialization.XmlSerializer? I am using Visual Basic 2005.
    Has this happened to anybody else?

    Thanks in advance.
    McoreD

    Just happnened again:
    </Config>ig>
    Last edited by ~*McoreD*~; Dec 5th, 2005 at 06:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width