Sams Teach Yourself C# in 24 Hours
- Table of Contents
- Copyright
- About the Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Audience and Organization
- Conventions Used in This Book
- Onward and Upward!
- Part I. The Visual Studio Environment
- Hour 1. A C# Programming Tour
- Hour 2. Navigating C#
- Hour 3. Understanding Objects and Collections
- Hour 4. Understanding Events
- Part II. Building a User Interface
- Hour 5. Building FormsPart I
- Hour 6. Building FormsPart II
- Hour 7. Working with the Traditional Controls
- Hour 8. Advanced Controls
- Hour 9. Adding Menus and Toolbars to Forms
- Hour 10. Drawing and Printing
- Part III. Making Things HappenProgramming!
- Hour 11. Creating and Calling Methods
- Hour 12. Using Constants, Data Types, Variables, and Arrays
- Hour 13. Performing Arithmetic, String Manipulation, and Date/Time Adjustments
- Hour 14. Making Decisions in C# Code
- Hour 15. Looping for Efficiency
- Hour 16. Debugging Your Code
- Hour 17. Designing Objects Using Classes
- Hour 18. Interacting with Users
- Part IV. Working with Data
- Hour 19. Performing File Operations
- Hour 20. Controlling Other Applications Using Automation
- Hour 21. Working with a Database
- Part V. Deploying Solutions and Beyond
- Hour 22. Deploying a Solution
- Hour 23. Introduction to Web Development
- Hour 24. The 10,000-Foot View
- Appendix A. Answers to Quizzes/Exercises
XML
XML (eXtensible Markup Language) is a universal format for transferring data across the Internet. On the surface, XML files are simply text files. However, this is oversimplifying things. The beauty in XML is that XML files themselves contain not only data, but self-describing information (metadata) about the data. The fact that XML files are text files makes it relatively easy to move them across boundaries (such as firewalls) and platforms.
<tagname>data</tagname>
For example, you could store a color in an element titled BackColor, like this:
<BackColor>Blue</BackColor>
It's important to note that XML tags are case sensitive; therefore, BackColor is not the same as backcolor, and both elements could exist in the same XML file.
Elements can be nested as long as the starting and ending tags of elements don't overlap. For example, two customers could be stored in an XML file like this:
<Customer> <Name>John Smith</Name> <OrderItemID>Elder Scrolls: Morrowind</OrderItemID> <Price>$20.00</Price> </Customer> <Customer> <Name>Jane Aroogala</Name> <OrderItemID>Ultima VII: The Black Gate</OrderItemID> <Price>$62.00</Price> </Customer>
XML files can be much more complex, but this simple example should suffice to show you that XML documents are text documents that can store just about any type of data you can think of. In fact, Microsoft is using XML in just about everything, from ADO.NET to XML Web services.
SOAP | Next Section

Account Sign In
View your cart