Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help - XMLInterviewQuestion
Blog
 
# Friday, January 22, 2010

XSLT is a rule based language used to transform XML documents in to other file formats. XSLT are nothing but generic transformation rules which can be applied to transform XML document to HTML, CS, Rich text etc. the XSLT processor takes the XML file and applies the XSLT transformation to produce a different document.

XPATH It is an XML query language to select specific parts of an XML document. Using XPATH you can address or filter elements and text in a XML document. For instance a simple XPATH expression like "Invoice/Amount" states find "Amount" node which are children of "Invoice" node.

Friday, January 22, 2010 5:39:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

MSXML supports XMLDOM and SAX parsers while .NET framework XML classes support XML DOM and XML readers and writers.

MSXML supports asynchronous loading and validation while parsing. For instance you can send synchronous and asynchronous calls to a remote URL. But as such there is not direct support of synchronous and asynchronous calls in .NET framework XML. But same can be achieved by using "System.Net" namespaces.

Friday, January 22, 2010 5:33:56 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

"System.xml.dll" is the actual physical file which has all XML implementation. Below are the commonly used namespaces:-

√ System.Xml

√ System.Xml.Schema

√ System.Xml.XPath

√ System.Xml.Xsl

Friday, January 22, 2010 5:32:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

XSL (the eXtensible Stylesheet Language) is used to transform XML document to some other document. So its transformation document which can convert XML to some other document. For instance you can apply XSL to XML and convert it to HTML document or probably CSV files.

Friday, January 22, 2010 5:30:50 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

All data is normally parsed in XML but if you want to exclude some elements you will need to put those elements in CDATA.

With CSS you can format a XML document.

Friday, January 22, 2010 5:30:19 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

If a XML document is confirming to XML rules (all tags started are closed, there is a root element etc) then it’s a well formed XML.

If XML is confirming to DTD rules then it’s a valid XML.

Friday, January 22, 2010 5:29:16 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

It defines how your XML should structure. For instance in the above XML we want to make it compulsory to provide "qty" and "totalcost", also that these two elements can only contain numeric. So you can define the DTD document and use that DTD document with in that XML

Friday, January 22, 2010 5:28:11 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

Note: - This is an interview question where the interviewer wants to know why you have chosen XML. Remember XML was meant to exchange data between two entities as you can define your user friendly tags with ease. In real world scenarios XML is meant to exchange data. For instance you have two applications who want to exchange information. But because they work in two complete opposite technologies it’s difficult to do it technically. For instance one application is made in JAVA and the other in .NET. But both languages understand XML so one of the applications will spit XML file which will be consumed and parsed by other applications You can give a scenario of two applications which are working separately and how you chose XML as the data transport medium.

Friday, January 22, 2010 5:24:34 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

No, they both go together one is for describing data while other is for displaying data.

Friday, January 22, 2010 5:23:55 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

XML describes data while HTML describes how the data should be displayed. So HTML is about displaying information while XML is about describing information.

Friday, January 22, 2010 5:22:08 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

Yes, they are case sensitive.

Friday, January 22, 2010 5:21:37 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

No, every tag in XML which is opened should have a closing tag.

Friday, January 22, 2010 5:21:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 

XML (Extensible markup language) is all about describing data. Below is a XML which describes invoice data.

<?xml version="1.0" encoding="utf-8"?>
<
Product>
   <
productname>Shoes</productname>
   <
qty>12</qty>
   <
totalcost>100</totalcost>
   <
discount>10</discount>
</
Product>

An XML tag is not something predefined but it is something you have to define according to your needs. For instance in the above example of invoice all tags are defined according to business needs. The XML document is self explanatory, any one can easily understand looking at the XML data what exactly it means.

Friday, January 22, 2010 5:20:13 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 
# Friday, January 01, 2010

The XML API for the .NET Framework comprises the following set of functionalities:

XML readers: With XML readers the client application get reference to instance of reader class. Reader class allows you to scroll forward through the contents like moving from node to node or element to element. You can compare it with the "SqlDataReader" object in ADO.NET which is forward only. In short XML reader allows you to browse through the XML document.

XML writers Using XML writers you can store the XML contents to any other storage media. For instance you want to store the whole in memory XML to a physical file or any other media.

XML document classes XML documents provides a in memory representation for the data in an XMLDOM structure as defined by W3C. It also supports browsing and editing of the document. So it gives you a complete memory tree structure representation of your XML document.

Friday, January 01, 2010 5:37:07 AM (GMT Standard Time, UTC+00:00)  #    Comments [0]   XML Interview Question  | 
Copyright © 2010 SoftwareCodeHelp. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: