XML files contain both the actual data (or content) and the elements that identify the data. The XML Designer provides two ways to view and work with XML documents, XML view and Data view. XML view, as its name implies, is actual XML code (or XML markup). Data view interprets the XML source and displays the contents in a data grid. Using the XML designer in XML view provides both color-coding, which makes the code easy to read, and IntelliSense, for helping to locate syntax errors. Additionally, if a schema is associated with the XML file the statement completion feature is enabled, as well as an option to validate the XML data against the schema.
Note There are some instances of XML documents where Data view is disabled. This occurs when the XML data cannot be mapped into the dataset. If your XML document is structured in this way, changing to Data view will present a message stating; "Although this XML document is well formed, it contains structure that Data View cannot display."
In This Section
- Creating New XML Files
- Describes how to add new XML files to a project.
- Assigning Schemas to XML Files
- Describes how to set the targetSchema property, in order to associate a schema to an XML file.
- Checking for Well-Formed and Valid XML
- Describes how to confirm XML files have correct syntax and content.
- Creating XML Schemas from XML Files
- Describes how to use the XML Designer to infer a schema based on existing XML data.
- Walkthrough: Creating an XML File with an Associated XML Schema
- Provides step-by-step instructions for how to create an XML Schema and associated XML file, including element, type definitions, and setting the targetSchema property.
- XML Schemas and Data
- Introduces topics and sections that describe how to use the XML Designer to work with XML Schemas and datasets.
- XML Schemas and the XML Designer
- Introduces topics that describe the different elements in XML Schemas and how they are created using the XML Designer.
- Creating XML Schemas and Datasets
- Introduces topics that describe the different ways that schemas and datasets can be created using the XML Designer, as well as describing the connection between datasets and schemas.
- Relational Data in XML Schemas
- Introduces topics that describe the different options in XML Schemas for representing relational data.
- XML in Visual Studio
- Provides links to a variety of topics about XML.
- World Wide Web Consortium (W3C) Web site (http://www.w3.org/)
- Links to the XML Schema primer and other XML info posted by the W3C.
- XML Developer Center on MSDN Online (http://msdn.microsoft.com/xml/default.asp)
- Provides various resources about XML.
- XML Schema Reference (XSD)
- Provides reference topics for schema elements and data types.
- XML Designer
- Provides an overview of the XML Design tool in Visual Studio.