Visual Studio Toolbox: Using LINQ to XML to Write XML
- Posted: Oct 05, 2011 at 10:15 AM
- 39,634 Views
- 8 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
Previously on Visual Studio Toolbox, Robert showed how to use LINQ to XML to query data from Web sites. In this episode, Robert shows how to use LINQ to XML to write XML. He starts with a simple example that stores personal settings in an XML file, and then retrieves wines from Wine.com and writes them to an XML file. This provides offline storage of the wines data. (You can think of this as the second half of his review of LINQ to XML, but last week's episode was a robust 40 minutes long while this one is a crisp 15. So it's really more like the last quarter
)
Check out Robert's blog for all the code he used in this episode.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Where's the C++ love ?
Please add a full screen option to the player!
Thanks! Great examples.
Is there a way I can "UPLOAD" an xml? I mean, in the first one, insert a new name without erasing the last one
Wrote the last post without signning in this way I can read the answer, thanks!!
@Indra: .. Its kinda pointless to argue about the superiority of manged versus native code .. the numbers speak for themselves .. but this time I can't resist ... Linq is a C# and VB thing .. its not native .. and as for C# vs C++ here's what the great Charles Petzold says .. "I became a strong advocate of managed code, and I really haven't had any reason to return to the world of message loops and wayward memory pointers. I already paid my Windows API dues, and plenty of them."
Good stuff. I'm trying to convert a complex XSD schema to C# classes and vice versa. I've tried the XSD.exe, but get nesting errors ( most people seem to on the forums ). Is there a way to do this using what you demoed in this video or an updated XSD.exe tool ( free or commercial ) to do this?
Thanks!
I enjoyed this one.
Remove this comment
Remove this thread
close