Click here to Skip to main content
Click here to Skip to main content

Fastest XML Serialization and Reflection Library

By , 23 Mar 2012
 

http://xmlserializer.codeplex.com/

The article and examples are in the zip file.

  Download TNTTools.zip - 2.7 MB

 

 

Quick Usage example:

r

Reflection

           ReflectionPropertyCache cache = new ReflectionPropertyCache();
           ObjectInfo carInfo = cache.GetCachedObjectInfo(mycar, mycar.GetType());
           carInfo.propertyInfo[0].setter.dateTimeSetter(mycar, DateTime.Now);
 

Serialization

  /// <summary>
       /// Serialization Example - Simple objects
       /// </summary>
       /// <param name="sender"></param>
       /// <param name="e"></param>
       private void Example1Serialization()
       {
           
            IPodConnector connector = new IPodConnector() { Version = "1.1a" };
                Screen screen = new Screen() { Size = "4 inch" };
                Stereo stereo = new Stereo() { Make = "alpine", Watts = "1000", };
                Car mycar = new Car() { brake = "5 piston", wheel = "22", Stereo = stereo, IPodConnector    =    connector };
 
        // Basic serialization example, raw with no attributes.
                StringBuilder XML1 = SerializerFacade.SerializeBasic(mycar);
                Car entityFromXml = SerializerFacade.Deserialize<Car>(XML1.ToString());
         }

Performance

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

rj45
Software Developer (Senior)
Canada Canada
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
BugBug in your performance measuring code - serialization is fast but not as fast as shownmemberhaindl23 Mar '12 - 1:23 
GeneralRe: Bug in your performance measuring code - serialization is fast but not as fast as shownmemberrj4523 Mar '12 - 5:02 
QuestionArticle?memberJustin Helsley22 Mar '12 - 8:26 
AnswerRe: Article?memberrj4522 Mar '12 - 8:44 
QuestionExpected moremvpMehdi Gholam22 Mar '12 - 6:03 
AnswerRe: Expected morememberrj4522 Mar '12 - 8:25 
I updated it, let me know if there is anything you would like to see. I have a had a lot of trouble with the codeproject text editor UI, but I just found the "switch to html" button. So, going forward, that should help. Smile | :)
 
Although I wish we could just upload a pdf or .docx or something and it would rip it out.
 
Thanks,
RJ45

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 23 Mar 2012
Article Copyright 2012 by rj45
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid