XML interview questions for fresher/XML Interview Questions and Answers for Freshers & Experienced

Define SGML?

SGML, a generalized markup language, is both powerful and large. It can be used for defining the structural descriptions of the different electronic document.

How Do I Configure An Xpointer Processor?

There is no required configuration for the XPointer Framework. The uberjar command line utility provides some configuration options. Applications configure individual XPointer processors when they obtain an instance from an appropriate XPointerProcessor factory method.

If Xml Is Just A Subset Of Sgml, Can I Use Xml Files Directly With Existing Sgml Tools?

Yes, provided you use up-to-date SGML software which knows about the WebSGML Adaptations TC to ISO 8879 (the features needed to support XML, such as the variant form for EMPTY elements; some aspects of the SGML Declaration such as NAMECASE GENERAL NO; multiple attribute token list declarations, etc).

An alternative is to use an SGML DTD to let you create a fully-normalised SGML file, but one which does not use empty elements; and then remove the DocType Declaration so it becomes a well-formed DTDless XML file. Most SGML tools now handle XML files well, and provide an option switch between the two standards.

Why should we go for XML editor instead of Notepad?

Yes, the W3C recommends using XHTML which is ‘a reformulation of HTML 4 in XML 1.0’. This specification defines HTML as an XML application, and provides three DTDs corresponding to the ones defined by HTML 4.* (Strict, Transitional, and Frameset).

The semantics of the elements and their attributes are as defined in the W3C Recommendation for HTML 4. These semantics provide the foundation for future extensibility of XHTML. Compatibility with existing HTML browsers is possible by following a small set of guidelines

Do I Have To Know Html Or Sgml Before I Learn Xml?

No, although it's useful because a lot of XML terminology and practice derives from two decades'experience of SGML. Be aware that ‘knowing HTML’ is not the same as ‘understanding SGML’. Although HTML was written as an SGML application, browsers ignore most of it (which is why so many useful things don't work), so just because something is done a certain way in HTML browsers does not mean it's correct, least of all in XML.

Using Xslt, How Would You Extract A Specific Attribute From An Element In An Xml Document?

Successful candidates should recognize this as one of the most basic applications of XSLT. If they are not able to construct a reply similar to the example below, they should at least be able to identify the components necessary for this operation: xsl:template to match the appropriate XML element, xsl:value-of to select the attribute value, and the optional xsl:apply-templates to continue processing the document.
Extract Attributes from XML Data
Example 1.
<xsl:template match="element-name">
Attribute Value:
<xsl:value-of select="@attribute"/>
<xsl:apply-templates/>
</xsl:template>

Give Some Examples Of Xml Dtds Or Schemas That You Have Worked With?

Although XML does not require data to be validated against a DTD, many of the benefits of using the technology are derived from being able to validate XML documents against business or technical architecture rules. Polling for the list of DTDs that developers have worked with provides insight to their general exposure to the technology. The ideal candidate will have knowledge of several of the commonly used DTDs such as FpML, DocBook, HRML, and RDF, as well as experience designing a custom DTD for a particular project where no standard existed.

Can You Walk Us Through The Steps Necessary To Parse Xml Documents?


Superficially, this is a fairly basic question. However, the point is not to determine whether candidates understand the concept of a parser but rather have them walk through the process of parsing XML documents step-by-step. Determining whether a non-validating or validating parser is needed, choosing the appropriate parser, and handling errors are all important aspects to this process that should be included in the candidate's response.

What are the different XML API's?

Tree-based API: It compiles and loads an XML document into the memory in a tree-like structure. You may traverse the tree structure, and alter it. Tree-based API's are useful for a wide range of uses. DOM parser is an example of a Tree-based API.

Event-based API: An event-based API delivers the information surrounding the parsing case to an application. This requires an integrated collection of callback features. SAX parser is an example of event-based API.

Explain XMLReader class.

XMLReader is read-only access to a set of XML data in an XML file or document; this process is less memory-consuming. It lets you run through the XML content one element at a time while allowing you to look at the value and then moves on to the next element.

What do you mean by XML data binding? Why is it used?

XML data binding refers to the reading and writing of XML data using a programming language. XML data binding usually occurs using a class library (like C++, Java ), specifically for the given XML data format.

With XML data binding, applications can directly access the required data with the XML file’s created APIs instead of relying on the Document Object Model (DOM) to retrieve the data from the XML file.

Why Not Just Carry On Extending Html?

HTML was already overburdened with dozens of interesting but incompatible inventions from different manufacturers, because it provides only one way of describing your information.

XML allows groups of people or organizations to question C.13, create their own customized markup applications for exchanging information in their domain (music, chemistry, electronics, hill-walking, finance, surfing, petroleum geology, linguistics, cooking, knitting, stellar cartography, history, engineering, rabbit-keeping, question C.19, mathematics, genealogy, etc).

HTML is now well beyond the limit of its usefulness as a way of describing information, and while it will continue to play an important role for the content it currently represents, many new applications require a more robust and flexible infrastructure.

Give A Few Examples Of Types Of Applications That Can Benefit From Using Xml?

There are literally thousands of applications that can benefit from XML technologies. The point of this question is not to have the candidate rattle off a laundry list of projects that they have worked on, but, rather, to allow the candidate to explain the rationale for choosing XML by citing a few real world examples. For instance, one appropriate answer is that XML allows content management systems to store documents independently of their format, which thereby reduces data redundancy. Another answer relates to B2B exchanges or supply chain management systems. In these instances, XML provides a mechanism for multiple companies to exchange data according to an agreed upon set of rules. A third common response involves wireless applications that require WML to render data on hand held devices.

Define XLink and XPointer?

In XML files, hyperlinks can be created using XLink. To point the hyperlinks to more specific points, XPointer is used.

What are the types of XML Parsers?

The XML parsers are of two types i.e. Non-Validating and Validating. If it’s a validating parser, it will validate XML against DTD and if its non-validating, it will not validate XML against DTD.

Why should we go for XML editor instead of Notepad?

XML editors allow building an error-proof XML document which is then validated against either of the two i.e. Schema or DTD. There are several reasons to use XML editors because they can check both open and closed tags, they can validate against DTD and Schema. The editor can also check the color code on a syntax of XML.

Why has XML been used for development?

There are several reasons for using XML for development such as:

>> When websites are data-driven
>> When e-commerce websites need data storage
>> When data storage and transport is required on the Internet
>> When there are flat files and the database
>> Whenever dynamic content has to be generated by implementing different style sheets.

What is a well-formed XML document?

A document can be considered well-formed if it is in accordance with certain rules such as all tags must be closed and properly nested, check for tags’ case sensitivity, and closing empty tags by using a forward.

What is the main disadvantage of DOM?

The main disadvantage is that a large portion of memory is consumed by DOM.

How comment can be represented in XML?

Comment can be represented as <!- – comments – -> as like HTML. This comment symbol is applicable for single or multiple lines.

What is CDATA?

CDATA is unparsed character data that cannot be parsed by the XML parser. Character < and > are illegal in XML elements. CDATA section starts with <![CDATA[“ and end with “]]>”.

What importance does XSLT hold in XML?

XSLT stands for Extensible Style sheet Language Transformation. It is used to transform an XML document to HTML before it is displayed to any browser.

What are the benefits of XML?

he benefits of XML are as follows:

>> Simplicity: XML is simple to read and understand.
>> Availability: XML can be created using any text editor.
>> Flexibility: XML doesn’t have any fixed tags, hence user-defined tags can also be used.

How to comment in XML?

<!– Write your comment here –>

The above syntax is used as a comment in XML, and these comments don’t show up on the screen.

How to convert XML to excel?

Step 1: Open Microsoft Excel

Step 2: Click on ‘file’ on the top left corner of MS Excel. If you are using MS Excel version 2007, click on the MS Office logo.

Step 3: You will land on the ‘open’ tab; if not, select the ‘open’ tab. Click ‘browse’ for the MS Excel version of 2010 and above.

Step 4: Double click on the XML file you want to export into MS Excel.

Step 5: Select ‘Open the file without applying a style sheet’ to select the standard format, or ‘Open the file with the stylesheet applied’ to format the data in accordance with the style sheet.

Step 6: Click on ‘save as’ and select ‘Excel Workbook’ from the drop-down menu.

Step 7: Save the file!

What does SMIL stand for and what is it used for?

SMIL stands for Synchronized Multimedia Integration Language. It is an XML language that is used to integrate images, text, and other media for a presentation.

What is XML data binding? Why is it used?

XML data binding is the process through which the information in the XML document is interpreted as an object in computer memory.

Binding XML data is used to reduce the development effort, simplify maintenance, increase reliability. It's saving time and money on your growth. It makes the XML data very intuitive to work with.

Define the concept of XPOINTER.

XPOINTER is used for pointing data to XML document. The actual part of the XML document is located with it. It is approved by the W3C.

See this example:

address.xml#pointer(/ descendant ::streetnumber[@id =9])

In this example, XPOINTER points "streetnumber = 9" in "address.xml".

What does SVG stand for and what is it used for?

SVG stands for Scalable Vector Graphics. It is an XML language that is used to display animations, images, graphics, and 2D from the XML code. Vector mathematical formulas are used here to render the content.

State some benefits of XML?

XML has several benefits to offer such as:

<> The language is simple to implement and learn.
<> The programming can be done using a text editor.
<> The possibility of defining new tags due to extensibility.
<> Self – explanatory.
<> Has multiple data types.

List some features of XML?

XML or the Extensible Markup Language has some amazing features that are easy when it comes to implementation and learning. Some of the remarkable ones are:

>> The XML files require no editors, as they are text-only.
>> When it comes to Syntax rules, XML has only a few of them.
>> The language is known for being extensible which specifies the tags’ structural rules.

What is XML Schema?

To define a document made of XML, Schema is used. A schema has certain elements in it such as different Elements & attributes, the Specific child elements, and its order, and element data types.

What are Xlink and Xpointer, and how are they related?

Xlink and Xpointer are joined by their common use in bringing hyperlink functionality to XML documents. If you are trying to create a hyperlink inside of an XML document, then you will need to use Xlink. If you are looking to instead provide a link to a specific part of an existing XML document from an outside document, then you will use Xpointer to direct the hyperlink to the appropriate location.

What rules must be followed to create a functioning XML document?

When working with XML documents, it is important to understand the rules of the language to ensure that any code created is correct and functional. An interviewer will often ask prospective employees to explain the key principals and requirements of languages they will be using. Although you do not need to offer an in-depth breakdown of every rule and industry standard for working with XML, you should note all of the key rules that any coder would be expected to know and understand.

What is the difference between simple element and complex element?

Simple elements in XML are items based on a text. It has less attributes, less child elements and can not be left empty.

Complex elements can therefore hold multiple attributes and elements. It can also include additional sub-elements and empty-element.

Define element and attribute in an XML document.

All you see in an XML document is XML element, from the start tag to the end tag. This may be comprised of other elements, attributes and texts.

An Attribute is a definition used to define additional element detail.

Let's take an example to understand it well:

<librarymembers>
<student id="1">
<name>suresh</name>
<age>45</age>
</student>
</librarymembers>

In the above example, <student> is an element and id is an attribute of the <student> element.

What is the difference between XML DTD and XML schema or XSD?

XSL stands for the language of Extensible Stylesheets. It is a language used to express stylesheets. Such stylesheets are identical to CSS, which specifies how to view a given type of XML document.

>> DTD stands for description of document type while XSD stands for definition of XML schema.

>> The DTD allows no namespaces. To define a schema, it has its own set of keywords while XSD uses its own set of namespaces and elements to define the schema.

>> DTD is the predecessor to XML schema because XML schema is a new technology, it is not yet supported by any XML parsers.

What is XSL?

XSL stands for the language of Extensible Stylesheets. It is a language used to express stylesheets. Such stylesheets are identical to CSS, which specifies how to view a given type of XML document.

What are the basic rules to write XML document?

You should consider writing an XML document with the following rules.

>> It will have to have a root element.

>> Both tags have to be closed.

>> Spaces are not allowed with tag names.

>> All tags must be properly nested.

>> Case-sensitive XML tags.

>> Use the values of the attributes within quotes.

>> In XML, whitespace is preserved.

How can you apply a DTD to an XML document?

You can: To add a DTD to an XML document.

1. Using the description of DTD elements inside the XML document itself.

2. Provide a DTD as a separate file and in XML document reference its name.

What is XML encoding error?

There are two types of errors about XML encoding:

>> The text content included an invalid character.
>> Switching from the current encoding to unsupported specified encoding.

It is because XML document can include non-ASCII characters such as Norwegian and French. You can avoid such errors by specifying the Unicode XML encoding.

What is a valid XML document?

A valid XML document is termed a structurally correct element. It should follow certain predefined rules for a particular type of document. These rules determine the type of data which can comprise each part of the document. The author of an XML document or someone else can write those rules.

What is a well formed XML document?

A syntactically formed XML document is considered a syntactically correct document. Does the XML need to follow a well defined XML document? Simple syntax rules:

1. This needs to have a tag that locks.

2. The closing tag will match the open tag with precision: XML is case sensitive.

3. All components are to be used in one root tag.

4. Child components under parent tag must be closed.

What is XPath in XML?

XPath is an XML-type technology. Used for removing items from XML documents. Since XML documents are structured, XPath expressions may be used to find and extract objects, attributes and values from XML data. It's similar to SQL.

What is XSNL?

XSNL is a language neutral to XML search. It language works as guided system and meta search interface.

What is SAX in XML?

SAX stands for Simple XML API. It is a parser with sequential access. It is a simple XML API which provides a data reading mechanism from an XML document. This is a DOM replacement. DOM works on the documents as a whole, SAX parsers work sequentially on each component of the XML document.

SAX does not have any formal specification like DOM and consumes fewer memory. But this can be used to only not compose the XML document.

What are the benefits of XML?

The key benefits of using XML are those.

Simplicity:The knowledge stored in XML is really simple to read and understand.

Openness:It is a W3C standard which is endorsed by market leaders in the software industry.

Extensibility: Extensible because it doesn't have a fixed set of tags. You can describe them however you like.

Self-descriptive: XML documents do not require unique schema configurations to store data like traditional databases. Without these concepts XML documents may be processed as they include metadata in the form of tags and attributes.

Scalable: XML is not in binary format so that you can create and edit files with anything, and debugger is easy too.

Fast access: XML documents are hierarchically arranged and it's comparatively easier.

Why Is Xml Such An Important Development?

It removes two constraints which were holding back Web developments:
1. dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for;
2. the complexity of full SGML, whose syntax allows many powerful but hard-to-program options. XML allows the flexible development of user-defined document types. It provides a robust, nonproprietary, persistent, and verifiable file format for the storage and transmission of text and data both on and off the Web; and it removes the more complex options of SGML, making it easier to program for.

What Is A Markup Language?

A markup language is a set of words and symbols for describing the identity of pieces of a document (for example ‘this is a paragraph’, ‘this is a heading’, ‘this is a list’, ‘this is the caption of this figure’, etc). Programs can use this with a style sheet to create output for screen, print, audio, video, Braille, etc.
Some markup languages (e.g. those used in word processors) only describe appearances (‘this is italics’, ‘this is bold’), but this method can only be used for display, and is not normally re-usable for anything else.

What Is Xml?

XML is the Extensible Markup Language. It improves the functionality of the Web by letting you identify your information in a more accurate, flexible, and adaptable way.
It is extensible because it is not a fixed format like HTML (which is a single, predefined markup language). Instead, XML is actually a metalanguage—a language for describing other languages— which lets you design your own markup languages for limitless different types of documents. XML can do this because it's written in SGML, the international standard metalanguage for text document markup (ISO 8879).

Search
R4R Team
R4R provides XML Freshers questions and answers (XML Interview Questions and Answers) .The questions on R4R.in website is done by expert team! Mock Tests and Practice Papers for prepare yourself.. Mock Tests, Practice Papers,XML interview questions for fresher,XML Freshers & Experienced Interview Questions and Answers,XML Objetive choice questions and answers,XML Multiple choice questions and answers,XML objective, XML questions , XML answers,XML MCQs questions and answers Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher R4r provides Python,General knowledge(GK),Computer,PHP,SQL,Java,JSP,Android,CSS,Hibernate,Servlets,Spring etc Interview tips for Freshers and Experienced for XML fresher interview questions ,XML Experienced interview questions,XML fresher interview questions and answers ,XML Experienced interview questions and answers,tricky XML queries for interview pdf,complex XML for practice with answers,XML for practice with answers You can search job and get offer latters by studing r4r.in .learn in easy ways .