|
|
| | |
The next Coding Challenge, parsing XML Posted: 15 Jan 08 7:41 PM (N/A) |
| | |
Here's the next Coding Challenge. This week the theme is XML.
The challenge is to take an XML file, any xml file you please (one is supplied for the creatively-challenged) and parse through it. Sounds easy right? It should be, it's right from the book (pg 458). So what's the big deal? The trick is trying to identify the key nodes of the xml and when you hit the right one, do something with it. Something, anything!
For example, the sample XML file is one of the NHL and the leagues websites. My idea is to have the user click on a website and then the program will take that website's URL and make a WebBrowser navigate to it. The key is trying to figure out when the user clicks on a website treenode from the other chaff in the XML/treenode. There's also a small wrinkle in the XML I provided (Sens and Habs have bilingual websites).
Sound easy enough? GOOD! Perfect! :> We know the APIs, we have excellent reference material, all you need to do is whip it up. I guarantee you're going to have some challenges, but that's the fun. That's what the coding challenge is for! Please, try it out, have some fun with it! I know I am! :>
|
Leagues.xml |
| |
| | |
Re: The next Coding Challenge, parsing XML Posted: 25 Jan 08 8:27 AM (Canada) |
| | |
Here is the answer for the Coding Challenge: XML.
The solution has three projects in it, the first is a simple xml reader, the second extends the first exercise to show websites in a WebBreowser control, and the last project is from the book with the addition of saving the new information back to the XML file.
I hope you were able to try this out. By all means, if you have any comments/questions, please post them here for all to help out with.
Thanks. |
Chapter9-WorkingWithXml.zip Leagues.xml |
| |
| | .NET Development MCTS 70-526 Study Group The next Coding Challenge, parsing XML | | |
| | | |