Gerar classes .NET a partir de XSD – Serialização de objetos

May 12, 2011

Fala Pessoal!

Quando trabalhamos com serialização de objetos, muitas vezes temos que partir apenas do schema do XML para criar nossas classes serializáveis. Para ganharmos tempo, temos uma ferramenta no Visual Studio que gera as classes necessárias automáticamente de acordo com o schema XSD.

Para gerar as classes a partir do programa xsd.exe, basta abrir o Visual Studio 2008 Command Prompt e digitar o seguinte:

xsd C:\scr3030.201102.xsd  /c /l:VB /o:C:\

Explicando:

xsd -> xsd.exe, executável que irá gerar as classes.
C:\scr3030.201102.xsd -> Local do schema XSD
/c -> Opção para geração de classes. Também é possível gerar uma dll ou um DataSet.
/l:VB -> Linguagem que será gerada a classe.
/o:C:\ -> Diretório de saída.

Para mais detalhes, acesse a documentação no MSDN aqui.

É isso. Simples e quebra um galhão! rs

Abraço!

60 Responses to “Gerar classes .NET a partir de XSD – Serialização de objetos”

  1. Muito interessante seu post, foi muito útil.

  2. Como serializar e deserializar arquivos xml padrão ANS?

  3. Mauro tem uma material bem interessante nesse link:
    http://msdn.microsoft.com/pt-br/library/182eeyhh(v=vs.80).aspx

  4. Hello Nice Day , I just checking the blog to retrieve an inspiration or else an remarkable information. Excellent blog, thank you for distribution. Julia

  5. When someone writes an piece of writing he/she maintains the idea of a user in his/her mind that how a user can know it. Therefore that’s why this post is outstdanding. Thanks!|

  6. Hi I am so grateful I found your webpage, I really found you by mistake, while I was looking on Yahoo for something else, Nonetheless I am here now and would just like to say cheers for a tremendous post and a all round entertaining blog (I also love the theme/design), I don’t have time to read through it all at the moment but I have book-marked it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the awesome job.|

  7. Hi there. I discovered your website by means of Google even as searching for a related subject, your web site got here up. It seems good. I’ve bookmarked it in my google bookmarks to come back then.

  8. What’s up Dear, are you in fact visiting this website regularly, if so after that you will definitely get good knowledge.|

  9. Hey there, You’ve done a fantastic job. I’ll certainly digg it and personally recommend to my friends. I am sure they will be benefited from this site.|

  10. Hi, I’ve been a lurker around your blog for a few months. I love this article and your entire site! Looking forward to reading more!

  11. Hi, i believe that i saw you visited my web site so i came to return the favor?.I’m attempting to in finding issues to improve my website!I guess its adequate to use some of your ideas!!|

  12. {

  13. Thanks, this site is extremely practical.|

  14. Knury PIC to najlepsze knury w Polsce. Charakteryzuje je duża mięsność.

  15. hey there and thank you for your information – I’ve definitely picked up something new from right here. I did however expertise some technical issues using this site, as I experienced to reload the web site a lot of times previous to I could get it to load correctly. I had been wondering if your hosting is OK? Not that I’m complaining, but sluggish loading instances times will very frequently affect your placement in google and could damage your quality score if ads and marketing with Adwords. Well I’m adding this RSS to my e-mail and could look out for a lot more of your respective fascinating content. Ensure that you update this again very soon.|

  16. Great write-up, I¡¦m normal visitor of one¡¦s website, maintain up the nice operate, and It’s going to be a regular visitor for a long time.

  17. Hello friend. Let me recommend myself. I am Javier. Going to karaoke is a thing I really love doing. She works so an take advantage of clerk but also she’ll end promoted fairly quickly. Some time in I decided upon to in real time in Arizona ( az ) but My will have to work in a definite year to two.

  18. I’ve been absent for a while, but now I remember why I used to love this blog. Thanks , I¡¦ll try and check back more often. How frequently you update your website?

  19. Wow, wonderful weblog structure! How long have you been blogging for? you made blogging glance easy. The entire look of your website is excellent, as smartly as the content material!

  20. Hello. impressive job. I did not imagine this. This is a fantastic story. Thanks!

  21. Great ¡V I should certainly pronounce, impressed with your web site. I had no trouble navigating through all the tabs as well as related information ended up being truly simple to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or anything, site theme . a tones way for your customer to communicate. Excellent task..

  22. Thanks for the points you have shared here. Another thing I would like to state is that computer system memory requirements generally rise along with other advancements in the technological know-how. For instance, if new generations of cpus are made in the market, there is usually a related increase in the size and style preferences of all laptop or computer memory and also hard drive room. This is because the software program operated simply by these cpus will inevitably surge in power to take advantage of the new technological innovation.

  23. Witaj, ciekawy wpis. Dawno nie pisałem tak interesującego pisarstwa.

  24. Witaj, ciekawy wpis. Określony czas nie widziałem tak interesującego dzieła

  25. Hello, i think that i saw you visited my site so i came to “return the favor”.I am trying to find things to enhance my site!I suppose its ok to use some of your ideas!!

  26. I haven¡¦t checked in here for a while because I thought it was getting boring, but the last several posts are great quality so I guess I will add you back to my daily bloglist. You deserve it my friend :)

  27. I don’t even know how I ended up here, but I thought this post was good. I don’t know who you are but certainly you are going to a famous blogger if you aren’t already ;) Cheers!

  28. I have come to understand that costs for on-line degree professionals tend to be an awesome value. For instance a full Bachelor’s Degree in Communication with the University of Phoenix Online consists of Sixty credits at $515/credit or $30,900. Also American Intercontinental University Online gives a Bachelors of Business Administration with a complete program requirement of 180 units and a tariff of $30,560. Online degree learning has made having your college diploma been so detailed more than before because you can easily earn your current degree through the comfort of your home and when you finish working. Thanks for all other tips I’ve learned from your website.

  29. Hello. magnificent job. I did not expect this. This is a fantastic story. Thanks!

  30. I am constantly invstigating online for ideas that can help me. Thank you!

  31. I have seen a great deal of useful points on your web site about computers. However, I’ve got the opinion that lap tops are still less than powerful sufficiently to be a option if you generally do things that require many power, including video croping and editing. But for website surfing, microsoft word processing, and many other typical computer work they are just great, provided you do not mind the little screen size. Thank you for sharing your thinking.

  32. Hey, you used to write great, but the last several posts have been kinda boring¡K I miss your great writings. Past several posts are just a little out of track! come on!

  33. you are in reality a good webmaster. The web site loading pace is incredible. It sort of feels that you’re doing any unique trick. In addition, The contents are masterwork. you have done a great process on this subject!

  34. Heya i’m for the first time here. I came across this board and I find It truly useful & it helped me out a lot. I hope to give something back and help others like you helped me.

  35. Everyone loves what you guys are up too. Such clever work and reporting! Keep up the good works guys I’ve included you guys to my personal blogroll.|

  36. Great weblog here! Additionally your website so much up very fast! What web host are you the usage of? Can I get your affiliate link to your host? I desire my site loaded up as quickly as yours lol

  37. Initial, let’s kill off a genuine fabrication: You can not use a reverse cellular phone number lookup for entirely free of charge anywhere, anytime.

  38. Wow! Thank you! I continually wanted to write on my site something like that. Can I implement a fragment of your post to my site?

  39. I have been exploring for a bit for any high quality articles or blog posts on this sort of space . Exploring in Yahoo I finally stumbled upon this website. Reading this info So i

  40. Great blog! I am loving it!! Will be back later to read some more. I am bookmarking your feeds also

  41. Thank you for every other informative website. Where else could I get that kind of info written in such an ideal approach? I’ve a mission that I am simply now working on, and I’ve been at the look out for such information.

  42. Very nice post and straight to the point. I don’t know if this is really the best place to ask but do you guys have any thoughts on where to get some professional writers? Thanks in advance :)

  43. fantastic issues altogether, you just received a new reader. What might you suggest in regards to your post that you simply made some days ago? Any positive?

  44. Great blog right here! Also your website quite a bit up fast! What web host are you using? Can I get your affiliate link for your host? I wish my web site loaded up as quickly as yours lol

  45. Great amazing issues here. I am very satisfied to see your article. Thank you so much and i am having a look ahead to contact you. Will you please drop me a mail?

  46. Hi my family member! I wish to say that this article is awesome, great written and come with approximately all vital infos. I¡¦d like to see extra posts like this .

  47. Thanks for any other wonderful post. Where else could anyone get that type of information in such a perfect method of writing? I have a presentation next week, and I am on the search for such info.

  48. I just wanted to type a simple note to say thanks to you for all of the nice steps you are giving here. My prolonged internet investigation has now been paid with reputable insight to write about with my two friends. I would state that that most of us site visitors are unequivocally blessed to dwell in a remarkable website with many perfect individuals with beneficial basics. I feel truly privileged to have come across your web pages and look forward to many more entertaining moments reading here. Thank you once again for all the details.

  49. Quality articles may be the key to attract the viewers
    to head to see the site, that’s what this webpage is providing.

    Also visit my weblog; LoiseJGilham

  50. pulsa listrik

  51. Right here is the perfect site for anybody who wishes to find out about this topic. You realize so much its almost hard to argue with you (not that I personally will need to…HaHa). You definitely put a new spin on a topic that has been discussed for ages. Excellent stuff, just excellent!

  52. wow gold

  53. denizli escort

  54. Hi, What is the best free software to automatically backup wordpress database and files ? A software that is trustworthy and would not hack your password in wordpress. Have you tried it ? For How long ? Thanks……

  55. This design is spectacular! You obviously know how to keep a reader entertained. Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Wonderful job. I really enjoyed what you had to say, and more than that, how you presented it. Too cool!

  56. I am always browsing online for tips that can assist me. Thanks!

  57. Do you mind if I quote a couplefew of your postsarticles as long as I provide credit and sources back to your webpagesitewebsiteweblogblog? My blog sitewebsiteblog is in the very sameexact same area of interestniche as yours and my visitorsusers would certainlydefinitelygenuinelytrulyreally benefit from a lot of thesome of the information you presentprovide here. Please let me know if this alrightokayok with you. RegardsThanks a lotAppreciate itCheersThank youMany thanksThanks!

  58. Thank you for sharing excellent informations. Your web-site is very cool. I am impressed by the details that you’ve on this web site. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my friend, ROCK! I found simply the information I already searched all over the place and simply couldn’t come across. What a perfect website.

  59. I do consider all of the concepts you have offered on your post. They’re really convincing and will definitely work. Nonetheless, the posts are too brief for novices. Could you please lengthen them a little from subsequent time? Thank you for the post.

  60. excellent submit, very informative. I ponder why the opposite experts of this sector don’t notice this. You should continue your writing. I am sure, you’ve a great readers’ base already!

Leave a Reply