Visual Studio Toolbox: Using LINQ to XML to Write XML
- Posted: Oct 05, 2011 at 10:15 AM
- 37,816 Views
- 8 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- Mid Quality WMV (Lo-band, Mobile)
- High Quality MP4 (iPad, PC)
- MP4 (iPod, Zune HD)
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 Closed
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
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