KyaPoocha.com

Huge Collection of Interview Questions


Briefly discuss the XML support in the .NET Framework. 

One of the top features in the .NET Framework is the level of XML/Web services integration and support.

The .NET Framework provides extensive support to work with XML and Web services, and at the same time it makes use of XML technologies at various places inside the Framework and the language specifications. For example, the configuration files in .NET Framework now use the XML syntax. The popular web.config file (for ASP.NET Web sites) is an XML file. While writing the C# .NET code the special ///-style comments can be used to generate the code documentation in XML or HTML format. The .NET Framework supports creating and consuming XML Web services. The Visual Studio .NET further simplifies these tasks. The .NET XML Web services, in addition to supporting SOAP method of invocation, also support GET and POST access to the Web service methods. ASP.NET Web services automagically generates the Web methods documentation (based on the attribute values set in the code), and provide a test environment for Web methods.

As far as processing XML is concerned, the primary namespace that is used is System.Xml. This namespace provides the classes that support DOM Level 1 and Level 2 (XmlDocument), XPath (XmlNavigator), XML validation (XmlValidatingReader), generating and reading XML (using XmlTextWriter and XmlTextReader), and transformation using XslTransform.

The ADO.NET System.Data.DataSet class supports writing disonnected recordset in the XML format, and reading XML to populate the DataSet instance. XML Schemas (XSD) alongwith the DataSet class can be used to work with the strongly typed DataSet that allow us to access tables and columns by name, instead of using collection-based methods (that is, with this we can write CustomerDS.OrderID instead of CustomerDS[”OrderID”]). In addition to the improved readability, typed DataSet offers many other benefits, such as code-completion in Visual Studio .NET, type-checking at compile time, and so on.

Finally, it is important to mention about the XmlDataDocument class. XmlDataDocument class derives from XmlDocument and also contains a member of type DataSet; allowing us to load either relational data or XML data, and then manipulate it using the W3C DOM.



If you liked this question/asnwer, make sure you
Subscribe to KyaPoocha.com RSS feed!


BOOKMARK THIS : BlinkList | del.icio.us | Digg it | Furl | reddit | StumbleUpon | Yahoo MyWeb |