XML Interview Questions & Answers

5 avg. rating (100% score) - 1 votes

XML Interview Questions & Answers

Are you looking for bright career in the XML? Then we have provided all the necessary things like XML Interview Question and Answers on our site page, not only the Question and Answers we have also provided the various job roles in XML. In order to clear the XML interview in the first attempt one must prepare well on all the topics of XML. There are numerous leading companies that offer jobs in various roles like XML Software Developer, Application Programming / Maintenance, Apps Programmer/ Analyst, Systems/Product Software along with these there are many other roles too in XML. For any other details on XML related topics and also for various leading XML job positions visit our site Wisdomjobs XML page.

XML Interview Questions

XML Interview Questions
    1. Question 1. What Is Xml?

      Answer :

      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).

    2. Question 2. What Is A Markup Language?

      Answer :

      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.

    3. Question 3. Why Is Xml Such An Important Development?

      Answer :

      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.

    4. Question 4. Describe The Role That Xsl Can Play When Dynamically Generating Html Pages From A Relational Database?

      Answer :

      Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so that it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.

    5. Question 5. What Is Sgml?

      Answer :

      SGML is the Standard Generalized Markup Language (ISO 8879:1986), the international standard for defining descriptions of the structure of different types of electronic document.

    6. Question 6. Aren't Xml, Sgml, And Html All The Same Thing?

      Answer :

      Not quite; SGML is the mother tongue, and has been used for describing thousands of different document types in many fields of human activity, from transcriptions of ancient Irish manuscripts to the technical documentation for stealth bombers, and from patients' clinical records to musical notation. SGML is very large and complex, however, and probably overkill for most common office desktop applications.

      XML is an abbreviated version of SGML, to make it easier to use over the Web, easier for you to define your own document types, and easier for programmers to write programs to handle them. It omits all the complex and less-used options of SGML in return for the benefits of being easier to write applications for, easier to understand, and more suited to delivery and interoperability over the Web. But it is still SGML, and XML files may still be processed in the same way as any other SGML file (see the question on XML software).

      HTML is just one of many SGML or XML applications—the one most frequently used on the Web. Technical readers may find it more useful to think of XML as being SGML-- rather than HTML++.

    7. Question 7. Who Is Responsible For Xml?

      Answer :

      XML is a project of the World Wide Web Consortium (W3C), and the development of the specification is supervised by an XML Working Group. A Special Interest Group of co-opted contributors and experts from various fields contributed comments and reviews by email.

      XML is a public format: it is not a proprietary development of any company, although the membership of the WG and the SIG represented companies as well as research and academic institutions. The v1.0 specification was accepted by the W3C as a Recommendation on Feb 10, 1998.

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

      Answer :

      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.

    9. Question 9. What Is Dom And How Does It Relate To Xml?

      Answer :

      The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines an application independent mechanism to access, parse, or update XML data. In simple terms it is a hierarchical model that allows developers to manipulate XML documents easily Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from an event-based interface like SAX.

    10. Question 10. What Is Soap And How Does It Relate To Xml?

      Answer :

      The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it as a natural application of XML

    11. Question 11. Why Not Just Carry On Extending Html?

      Answer :

      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.

    12. Question 12. Why Should I Use Xml?

      Answer :

      Here are a few reasons for using XML .
      * XML can be used to describe and identify information accurately and unambiguously, in a way that computers can be programmed to ‘understand’ (well, at least manipulate as if they could understand).
      * XML allows documents which are all the same type to be created consistently and without structural errors, because it provides a standardised way of describing, controlling, or allowing/disallowing particular types of document structure. [Note that this has absolutely nothing whatever to do with formatting, appearance, or the actual text content of your documents, only the structure of them].
      * XML provides a robust and durable format for information storage and transmission. Robust because it is based on a proven standard, and can thus be tested and verified; durable because it uses plain-text file formats which will outlast proprietary binary ones.
      * XML provides a common syntax for messaging systems for the exchange of information between applications. Previously, each messaging system had its own format and all were different, which made inter-system messaging unnecessarily messy, complex, and expensive. If everyone uses the same syntax it makes writing these systems much faster and more reliable.
      * XML is free. Not just free of charge (free as in beer) but free of legal encumbrances (free as in speech). It doesn't belong to anyone, so it can't be hijacked or pirated. And you don't have to pay a fee to use it (you can of course choose to use commercial software to deal with it, for lots of good reasons, but you don't pay for XML itself).
      * XML information can be manipulated programmatically (under machine control), so XML documents can be pieced together from disparate sources, or taken apart and re-used in different ways. They can be converted into almost any other format with no loss of information.
      * XML lets you separate form from content. Your XML file contains your document information (text, data) and identifies its structure: your formatting and other processing needs are identified separately in a stylesheet or processing system. The two are combined at output time to apply the required formatting to the text or data identified by its structure (location, position, rank, order, or whatever).

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

      Answer :

      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.

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

      Answer :

      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.

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

      Answer :

      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>

    16. Question 16. When Constructing An Xml Dtd, How Do You Create An External Entity Reference In An Attribute Value?

      Answer :

      Every interview session should have at least one trick question. Although possible when using SGML, XML DTDs don't support defining external entity references in attribute values. It's more important for the candidate to respond to this question in a logical way than the candidate know the some what obscure answer.

    17. Question 17. How Would You Build A Search Engine For Large Volumes Of Xml Data?

      Answer :

      The way candidates answer this question may provide insight into their view of XML data. For those who view XML primarily as a way to denote structure for text files, a common answer is to build a full-text search and handle the data similarly to the way Internet portals handle HTML pages. Others consider XML as a standard way of transferring structured data between disparate systems. These candidates often describe some scheme of importing XML into a relational or object database and relying on the database's engine for searching. Lastly, candidates that have worked with vendors specializing in this area often say that the best way the handle this situation is to use a third party software package optimized for XML data.

    18. Question 18. Does Xml Replace Html?

      Answer :

      No. XML itself does not replace HTML. Instead, it provides an alternative which allows you to define your own set of markup elements. HTML is expected to remain in common use for some time to come, and the current version of HTML is in XML syntax. XML is designed to make the writing of DTDs much simpler than with full SGML.

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

      Answer :

      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.

    20. Question 20. Is There An Xml Version Of Html?

      Answer :

      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

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

      Answer :

      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.

    22. Question 22. How Do I Configure An Xpointer Processor?

      Answer :

      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.

    23. Question 23. Who Can Create An Xml Namespace?

      Answer :

      Anybody can create an XML namespace -- all you need to do is assign a URI as its name and decide what element type and attribute names are in it. The URI must be under your control and should not be being used to identify a different XML namespace, such as by a coworker.

    24. Question 24. Do Xml Namespaces Apply To Entity Names, Notation Names, Or Processing Instruction Targets?

      Answer :

      No.
      XML namespaces apply only to element type and attribute names. Furthermore, in an XML documentthat conforms to the XML namespaces recommendation, entity names, notation names, and processing instruction targets must not contain colons.

    25. Question 25. Are The Names Of All Element Types And Attributes In Some Xml Namespace?

      Answer :

      No. 
      If an element type or attribute name is not specifically declared to be in an XML namespace -- that is, it is unprefixed and (in the case of element type names) there is no default XML namespace -- then that name is not in any XML namespace. If you want, you can think of it as having a null URI as its name, although no "null" XML namespace actually exists. For example, in the following, the element type name B and the attribute names C and E are not in any XML namespace: 
      <google:A xmlns:google="http://www.google.org/">
      <B C="bar"/>
      <google:D E="bar"/>
      </google:A>

    26. Question 26. How Does An Application Know Which Address Element Type It Is Processing?

      Answer :

      One solution is to simply rename one of the Address element types -- for example, we could rename the second element type IPAddress. However, this is not a useful long term solution. One of the hopes of XML is that people will standardize XML languages for various subject areas and write modular code to process those languages. By reusing existing languages and code, people can quickly define new languages and write applications that process them. If we rename the second Address element type to IPAddress, we will break any code that expects the old name. A better answer is to assign each language (including its Address element type) to a different namespace. This allows us to continue using the Address name in each language, but to distinguish between the two different element types. The mechanism by which we do this is XML namespaces. Note that by assigning each Address name to an XML namespace, we actually change the name to a two-part name consisting of the name of the XML namespace plus the name Address. This means that any code that recognizes just the name Address will need to be changed to recognize the new two-part name. However, this only needs to be done once, as the two-part name is universally unique.

    27. Question 27. How Can I Include A Conditional Statement In My Xml?

      Answer :

      You can't: XML isn't a programming language, so you can't say things like 
      <google if {DB}="A">bar</google> 

      If you need to make an element optional, based on some internal or external criteria, you can do so in a Schema. DTDs have no internal referential mechanism, so it isn't possible to express this kind of conditionality in a DTD at the individual element level. 

      It is possible to express presence-or-absence conditionality in a DTD for the whole document, by using parameter entities as switches to include or ignore certain sections of the DTD based on settings either hardwired in the DTD or supplied in the internal subset. Both the TEI and Docbook DTDs use this mechanism to implement modularity. 

      Alternatively you can make the element entirely optional in the DTD or Schema, and provide code in your processing software that checks for its presence or absence. This defers the checking until the processing stage: one of the reasons for Schemas is to provide this kind of checking at the time of document creation or editing.

      I have to do an overview of XML for my manager/client/investor/advisor. 

    28. Question 28. How Do I Use Graphics In Xml?

      Answer :

      Graphics have traditionally just been links which happen to have a picture file at the end rather than another piece of text. They can therefore be implemented in any way supported by the XLink and XPointer specifications including using similar syntax to existing HTML images. They can also be referenced using XML's built-in NOTATION and ENTITY mechanism in a similar way to standard SGML, as external unparsed entities.

      However, the SVG specification lets you use XML markup to draw vector graphics objects directly in your XML file. This provides enormous power for the inclusion of portable graphics, especially interactive or animated sequences, and it is now slowly becoming supported in browsers.

      The XML linking specifications for external images give you much better control over the traversal and activation of links, so an author can specify, for example, whether or not to have an image appear when the page is loaded, or on a click from the user, or in a separate window, without having to resort to scripting.

      XML itself doesn't predicate or restrict graphic file formats: GIF, JPG, TIFF, PNG, CGM, EPS, and SVG at a minimum would seem to make sense; however, vector formats (EPS, SVG) are normally essential for non-photographic images (diagrams).

      You cannot embed a raw binary graphics file (or any other binary [non-text] data) directly into an XML file because any bytes happening to resemble markup would get misinterpreted: you must refer to it by linking (see below). It is, however, possible to include a text-encoded transformation of a binary file as a CDATA Marked Section, using something like UUencode with the markup characters ], & and > removed from the map so that they could not occur as an erroneous CDATA termination sequence and be misinterpreted. You could even use simple hexadecimal encoding as used in PostScript. For vector graphics, however, the solution is to use SVG .

      Sound files are binary objects in the same way that external graphics are, so they can only be referenced externally. Music files written in MusiXML or an XML variant of SMDL could however be embedded in the same way as for SVG.

      The point about using entities to manage your graphics is that you can keep the list of entity declarations separate from the rest of the document, so you can re-use the names if an image is needed more than once, but only store the physical file specification in a single place. This is available only when using a DTD, not a Schema.

    29. Question 29. How Do I Control Formatting And Appearance?

      Answer :

      In HTML, default styling was built into the browsers because the tagset of HTML was predefined and hardwired into browsers. In XML, where you can define your own tagset, browsers cannot possibly be expected to guess or know in advance what names you are going to use and what they will mean, so you need a stylesheet if you want to display formatted text. Browsers which read XML will accept and use a CSS stylesheet at a minimum, but you can also use the more powerful XSLT stylesheet language to transform your XML into HTML—which browsers, of course, already know how to display (and that HTML can still use a CSS stylesheet). This way you get all the document management benefits of using XML, but you don't have to worry about your readers needing XML smarts in their browsers.

    30. Question 30. How Do I Execute Or Run An Xml File?

      Answer :

      XML itself is not a programming language, so XML files don't ‘run' or ‘execute'. XML is a markup specification language and XML files are just data: they sit there until you run a program which displays them (like a browser) or does some work with them (like a converter which writes the data in another format, or a database which reads the data), or modifies them (like an editor). If you want to view or display an XML file, open it with an XML editor or an question B.3, XML browser. The water is muddied by XSL (both XSLT and XSL:FO) which use XML syntax to implement a declarative programming language. In these cases it is arguable that you can ‘execute' XML code, by running a processing application like Saxon, which compiles the directives specified in XSLT files into Java bytecode to process XML.

    31. Question 31. Can I Use Javascript, Activex, Etc In Xml Files?

      Answer :

      This will depend on what facilities your users' browsers implement. XML is about describing information; scripting languages and languages for embedded functionality are software which enables the information to be manipulated at the user's end, so these languages do not normally have any place in an XML file itself, but in stylesheets like XSL and CSS where they can be added to generated HTML. XML itself provides a way to define the markup needed to implement scripting languages: as a neutral standard it neither encourages not discourages their use, and does not favour one language over another, so it is possible to use XML markup to store the program code, from where it can be retrieved by (for example) XSLT and re-expressed in a HTML script element. Server-side script embedding, like PHP or ASP, can be used with the relevant server to modify the XML code on the fly, as the document is served, just as they can with HTML. Authors should be aware, however, that embedding server-side scripting may mean the file as stored is not valid XML: it only becomes valid when processed and served, so care must be taken when using validating editors or other software to handle or manage such files. A better solution may be to use an XML serving solution like Cocoon, AxKit, or PropelX.

    32. Question 32. Can I Use Java To Create Or Manage Xml Files?

      Answer :

      Yes, any programming language can be used to output data from any source in XML format. There is a growing number of front-ends and back-ends for programming environments and data management environments to automate this. Java is just the most popular one at the moment. There is a large body of middleware (APIs) written in Java and other languages for managing data either in XML or with XML input or output.

    33. Question 33. How Does Xml Handle Metadata?

      Answer :

      Because XML lets you define your own markup languages, you can make full use of the extended hypertext features of XML (see the question on Links) to store or link to metadata in any format (eg using ISO 11179, as a Topic Maps Published Subject, with Dublin Core, Warwick Framework, or with Resource Description Framework (RDF), or even Platform for Internet Content Selection (PICS)). There are no predefined elements in XML, because it is an architecture, not an application, so it is not part of XML's job to specify how or if authors should or should not implement metadata. You are therefore free to use any suitable method. Browser makers may also have their own architectural recommendations or methods to propose.

    34. Question 34. Can I Encode Mathematics Using Xml ?

      Answer :

      Yes, if the document type you use provides for math, and your users' browsers are capable of rendering it. The mathematics-using community has developed the MathML Recommendation at the W3C, which is a native XML application suitable for embedding in other DTDs and Schemas. It is also possible to make XML fragments from other DTDs, such as ISO 12083 Math, or OpenMath, or one of your own making. Browsers which display math embedded in SGML existed for many years (eg DynaText, Panorama, Multidoc Pro), and mainstream browsers are now rendering MathML. David Carlisle has produced a set of stylesheets for rendering MathML in browsers. It is also possible to use XSLT to convert XML math markup to LATEX for print (PDF) rendering, or to use XSL:FO. Please note that XML is not itself a programming language, so concepts such as arithmetic and if-statements (if-then-else logic) are not meaningful in XML documents.

    35. Question 35. How Do I Get Xml Into Or Out Of A Database?

      Answer :

      Ask your database manufacturer: they all provide XML import and export modules to connect XML applications with databases. In some trivial cases there will be a 1:1 match between field names in the database table and element type names in the XML Schema or DTD, but in most cases some programming will be required to establish the desired match. This can usually be stored as a procedure so that subsequent uses are simply commands or calls with the relevant parameters. In less trivial, but still simple, cases, you could export by writing a report routine that formats the output as an XML document, and you could import by writing an XSLT transformation that formatted the XML data as a load file.

    36. Question 36. Can A Root Element Type Be Explicitly Declared In The Dtd?

      Answer :

      No. This is done in the document's Document Type Declaration, not in the DTD.

    37. Question 37. How Do I Create My Own Document Type?

      Answer :

      Document types usually need a formal description, either a DTD or a Schema. Whilst it is possible to process well-formed XML documents without any such description, trying to create them without one is asking for trouble. A DTD or Schema is used with an XML editor or API interface to guide and control the construction of the document, making sure the right elements go in the right places.

      Creating your own document type therefore begins with an analysis of the class of documents you want to describe: reports, invoices, letters, configuration files, credit-card verification requests, or whatever. Once you have the structure correct, you write code to express this formally, using DTD or Schema syntax.

    38. Question 38. Does Xml Let Me Make Up My Own Tags?

      Answer :

      No, it lets you make up names for your own element types. If you think tags and elements are the same thing you are already in considerable trouble: read the rest of this question carefully.

    39. Question 39. Xlink Markup Design

      Answer :

      Link markup needs to be recognized reliably by XLink applications in order to be traversed and handled properly. XLink uses the mechanism described in the Namespaces in XML Recommendation [XML Names] to accomplish recognition of the constructs in the XLink vocabulary.

    40. Question 40. What Three Essential Components Of Security Does The Xml Signatures Provide?

      Answer :

      authentication, message integrity, and non-repudiation. In addition to signature information, an XML Signature can also contain information describing the key used to sign the content.

    41. Question 41. What's Xlink?

      Answer :

      This specification defines the XML Linking Language (XLink), which allows elements to be inserted into XML documents in order to create and describe links between resources. It uses XML syntax to create structures that can describe links similar to the simple unidirectional hyperlinks of today’s HTML, as well as more sophisticated links.

    42. Question 42. What Xpointer Schemes Are Supported In This Release?

      Answer :

      The XPointer integration distributions support shorthand pointers.
      In addition, they bundle support for at last the following XPointer schemes:
      * xmlns()
      * element()
      * xpath() - This is not a W3C defined XPointer scheme since W3C has not published an XPointer sheme for XPath.

    43. Question 43. What About Non-xml Resources?

      Answer :

      You can use the XPointer Framework with non-XML resources. This is especially effective when your resource is backed by some kind of a DBMS, or when you want to query a data model, such as RDF, and not the XML syntax of a representation of that data model. However, please note that the authoratitive interpretation of the fragment identifier is determined by the Internet Media Type. If you want to opt-in for XPointer, then you can always create publish your own Internet Media Type with IANA and specify that it supports the XPointer Framework for some kind of non-XML resource. In this case, you are going to need to declare your own XPointer schemes as well.

    44. Question 44. Can I Resolve The Uri Used As An Xml Namespace Name?

      Answer :

      Yes.

    45. Question 45. Can I Use A Relative Uri As A Namespace Name?

      Answer :

      Yes. However, such usage is deprecated, so you should never do it.

    46. Question 46. What Is An Xml Namespace Name?

      Answer :

      An XML namespace name is a URI that uniquely identifies the namespace. URIs are used because they are widely understood and well documented. Because people may only allocate URIs under their control, it is easy to ensure that no two XML namespaces are identified by the same URI.

    47. Question 47. What Happens If There Is No Prefix On An Element Type Name?

      Answer :

      If a default XML namespace declaration is in scope, then the element type name is in the default XML namespace. Otherwise, the element type name is not in any XML namespace.

    48. Question 48. Can I Use The Same Prefix For More Than One Xml Namespace?

      Answer :

      Yes.

    49. Question 49. What Is An Xml Namespace Prefix?

      Answer :

      An XML namespace prefix is a prefix used to specify that a local element type or attribute name is in a particular XML namespace.

    50. Question 50. What Is A Qualified Name?

      Answer :

      A qualified name is a name of the following form. It consists of an optional prefix and colon, followed by the local part, which is sometimes known as a local name.
      prefix:local-part
      –OR–
      local-part

    51. Question 51. What Does A Namespace-aware Application Do When It Encounters An Error?

      Answer :

      The XML namespaces recommendation does not specify what a namespace-aware application does when it encounters a document that does not conform to the recommendation. Therefore, the behavior is application-dependent.

      For example, the application could stop processing, post an error to a log and continue processing, or ignore the error.

    52. Question 52. Can An Application Be Both Namespace-aware And Namespace-unaware?

      Answer :

      Yes.
      However, there is generally no reason to do this. The reason is that most applications understand a particular XML language, such as one used to transfer sales orders between companies. If the element type and attribute names in the language belong to an XML namespace, the application must be namespace-aware; if not, the application must be namespace-unaware.

      For a few applications, being both namespace-aware and namespace-unaware makes sense. For example, a parser might choose to redefine validity in terms of universal names and have both namespace-aware and namespace-unaware validation modes. However, such applications are uncommon.

    53. Question 53. Can An Application Process Documents That Use Xml Namespaces And Documents That Don't Use Xml Namespaces?

      Answer :

      Yes.
      This is a common situation for generic applications, such as editors, browsers, and parsers, that are not wired to understand a particular XML language. Such applications simply treat all element type and attribute names as qualified names. Those names that are not mapped to an XML namespace — that is, unprefixed element type names in the absence of a default XML namespace and unprefixed attribute names — are simply processed as one-part names, such as by using a null XML namespace name (URI).

    54. Question 54. How Do I Use Xml Namespaces With Sax 2.0?

      Answer :

      SAX 2.0 primarily supports XML namespaces through the following methods: * startElement and endElement in the ContentHandler interface return namespace names (URIs) and local names as well as qualified names. * getValue, getType, and getIndex in the Attributes interface can retrieve attribute information by namespace name (URI) and local name as well as by qualified name.

    55. Question 55. How Do Applications Process Documents That Use Xml Namespaces?

      Answer :

      Applications process documents that use XML namespaces in almost exactly the same way they process documents that don’t use XML namespaces. For example, if a namespace-unaware application adds a new sales order to a database when it encounters a Sales Order element, the equivalent namespace-aware application does the same. The only difference is that the namespace-aware application:
      * Might need to check for xmlns attributes and parse qualified names. Whether it does this depends on whether such processing is already done by lower-level software, such as a namespace-aware DOM implementation.
      * Uses universal (two-part) names instead of local (one-part) names.

    56. Question 56. What Software Is Needed To Process Xml Namespaces?

      Answer :

      From a document author’s perspective, this is generally not a relevant question. Most XML documents are written in a specific XML language and processed by an application that understands that language. If the language uses an XML namespace, then the application will already use that namespace — there is no need for any special XML namespace software.

    57. Question 57. How Do I Create Documents That Use Xml Namespaces?

      Answer :

      The same as you create documents that don’t use XML namespaces. If you’re currently using Notepad on Windows or emacs on Linux, you can continue using Notepad or emacs. If you’re using an XML editor that is not namespace-aware, you can also continue to use that, as qualified names are legal names in XML documents and xmlns attributes are legal attributes. And if you’re using an XML editor that is namespace-aware, it will probably provide features such as automatically declaring XML namespaces and keeping track of prefixes and the default XML namespace for you.

    58. Question 58. Can I Use Qualified Names In Dtds?

      Answer :

      Yes.
      For example, the following is legal:
      <!ELEMENT google:A (google:B)>
      <!ATTLIST google:A
      google:C CDATA #IMPLIED>
      <!ELEMENT google:B (#PCDATA)>

      However, because XML namespace declarations do not apply to DTDs , qualified names in the DTD cannot be converted to universal names.

      As a result, qualified names in the DTD have no special meaning.

      For example, google:A is just google:A — it is not A in the XML namespace to which the prefix google is mapped.

      The reason qualified names are allowed in the DTD is so that validation will continue to work.

    59. Question 59. Do Xml Namespace Declarations Apply To Dtds?

      Answer :

      No.
      In particular, an xmlns attribute declared in the DTD with a default is not an XML namespace declaration for the DTD.. (Note that an earlier version of MSXML (the parser used by Internet Explorer) did use such declarations as XML namespace declarations, but that this was removed in MSXML 4.

    60. Question 60. Does The Scope Of An Xml Namespace Declaration Ever Include The Dtd?

      Answer :

      No.
      XML namespaces can be declared only on elements and their scope consists only of those elements and their descendants. Thus, the scope can never include the DTD.

    61. Question 61. How Can I Declare Xml Namespaces So That All Elements And Attributes Are In Their Scope?

      Answer :

      XML namespace declarations that are made on the root element are in scope for all elements and attributes in the document. This means that an easy way to declare XML namespaces is to declare them only on the root element.

    62. Question 62. What Is The Scope Of An Xml Namespace Declaration?

      Answer :

      The scope of an XML namespace declaration is that part of an XML document to which the declaration applies. An XML namespace declaration remains in scope for the element on which it is declared and all of its descendants, unless it is overridden or undeclared on one of those descendants.

    63. Question 63. How Do I Undeclare The Default Xml Namespace?

      Answer :

      To “undeclare” the default XML namespace, you declare a default XML namespace with an empty (zero-length) name (URI). Within the scope of this declaration, unprefixed element type names do not belong to any XML namespace. For example, in the following, the default XML namespace is the http://www.google.org/ for the A and B elements and there is no default XML namespace for the C and D elements. That is, the names A and B are in the http://www.google.org/ namespace and the names C and D are not in any XML namespace.
      <A xmlns=”http://www.google.org/”>
      <B>
      <C xmlns=”">
      <D>abcd</D>
      </C>
      </B>
      </A>

    64. Question 64. Explain About Soap?

      Answer :

      SOAP acts as a medium to provide basic messaging framework. On these basic messaging frameworks abstract layers are built. It transfers messages across the board in different protocols; it also acts as a medium to transmit XML based messages over the network.

    65. Question 65. Give An Example About The Functioning Of Soap?

      Answer :

      Consider a real estate database with huge data ranges. If a user wants to search about a particular term, the message with all the required features such as price, availability, place, etc will be returned to the user in an XML formatted document which the user can integrate into third party site for additional performance.

    66. Question 66. Explain About Remote Call Procedure?

      Answer :

      Remote call procedure is considered as a very important function in SOAP. In RCP a user (node) sends a request to another node (server) where the information is processes and sent to the user. It immediately sends message across the network.

    67. Question 67. Explain About Transport Methods In Soap?

      Answer :

      Internet application layer is used to transfer messages from one end to another end. Various products have been transported successfully from one end to another end using SOAP. Both SMTP and HTTP are two successful transport protocols used in transmitting information, but HTTP has gained good ground than HTTP.

    68. Question 68. Explain About Https In Soap?

      Answer :

      HTTPS is similar to HTTP but it has an additional layer underneath the internet application layer which makes the data encrypted. This protocol is widely used than IOP or DCOM because those protocols are filtered by firewalls. HTTPS protocol advocates WS-I method to provide security for transmission of secured data.

    69. Question 69. Explain About The Role Of Xml In Soap?

      Answer :

      XML is chosen as a standard format because it was already in use by many large companies and immensely due to its open source nature. A wide variety of tools are available on shelves which ease the process of transition to SOAP. XML can significantly reduce the speed and efficiency but binary XML is being considered as a format for future.

    70. Question 70. What Are The Advantages Which A User Can Get When He Uses Soap?

      Answer :

      • SOAP by passes all firewalls thus making the process easier.
      • It has huge collection of protocols
      • It is platform and language independent
      • Simplicity and extensible nature makes it the most wanted

    71. Question 71. State Some Disadvantages Due To The Usage Of Soap?

      Answer :

      1) SOAP is much slower than middleware technologies
      2) Due to the usage of HTTP for transporting messages and not the defined ESB or WS-Addressing interaction of parties over a message is fixed.
      3) Information regarding the usability of HTTP for different purposes is not present which makes the application protocol level problematic.

    72. Question 72. Explain About Message Passing In Rpc?

      Answer :

      RPC is very friendly in implementing the client to server interaction model which makes it very prominent. When the server is interacting and searching for information the client side messaging is blocked and server activity goes on. RPC has huge pool of protocols which at times make it difficult to work with. Client server interaction can be best achieved by RPC.

    73. Question 73. Explain The Difference Between Rpc And Local Calls?

      Answer :

      An important difference between Remote call procedure and local call is that remote call can fail often and this occurs without the knowledge of the user. Local calls are easily handled. Another main difficulty lies with the code writing capability because it is written in a low level language.

    74. Question 74. What Are The Elements Which Should Be Contained In Soap Message?

      Answer :

      Following elements are contained in the SOAP message.
      1) An envelope element which identifies and translates the XML document into a SOAP message.
      2) A header element is a must as it should contain header message.
      3) A body is required which should contain call and response message.
      4) Fault element is required which can communicate about the errors occurred during the process

    75. Question 75. Explain About The Syntax Rules In Soap?

      Answer :

      Some of the important syntax rules are as follows
      1) SOAP should be coded in XML
      2) SOAP envelope should be used for SOAP message
      3) A SOAP encoding namespace must be used by SOAP.
      4) A DTD reference and a XML processing instruction should not be contained.

    76. Question 76. Explain About The Encoding Style Attribute?

      Answer :

      This is used to define the data types in the document. Any SOAP element may use this format and it gets implemented on the child and contents of the SOAP. SOAP element will never have a default encoding.

    77. Question 77. Explain About The Soap Envelope Element?

      Answer :

      A SOAP message will have the SOAP element as the root element. SOAP element name space should always have the value of : as that defines the Envelope.

    78. Question 78. Explain About The Actor Element?

      Answer :

      A SOAP message has to travel a very long distance between its client and server but during the process a part of the message may be intended to be deployed to another destination which is made possible by the SOAP elements actor attribute which address the header element to a particular location.

    79. Question 79. Explain About The Mustunderstand Attribute?

      Answer :

      This attribute indicates whether the header is optional or mandatory for the recipient to process. If you add mustUnderstand =”1” to the child element of the header element then it states that the header element must be processed otherwise it leads to failure.

    80. Question 80. Explain About The Soap Body Element?

      Answer :

      This part of the element will contain the message which is intended for the ultimate delivery point. An element can be described inside the body element as a default namespace which indicates about the error message during the process. SOAP element acts just like a code to be processed during the execution of a certain application.

    81. Question 81. Does The W3c Support Any Web Service Standards?

      Answer :

      The World Wide Web Consortium (W3C) is actively pursuing standardization of Web service protocols. In September 2000, the W3C established an XML Protocol Activity. The goal of the group is to establish a formal standard for SOAP. A draft version of SOAP 1.2 is currently under review, and progressing through the official W3C recommendation process.

      On January 25, 2002, the W3C also announced the formation of a Web Service Activity. This new activity will include the current SOAP work as well as two new groups. The first new group is the Web Services Description Working Group, which will take up work on WSDL. The second new group is the Web Services Architecture Working Group, which will attempt to create a cohesive framework for Web service protocols.

    82. Question 82. How Do I Get Started With Web Services?

      Answer :

      The easiest way to get started with Web services is to learn XML-RPC. Check out the XML-RPC specification or read my book, Web Services Essentials. O'Reilly has also recently released a book on Programming Web Services with XML-RPC by Simon St.Laurent, Joe Johnston, and Edd Dumbill.

      Once you have learned the basics of XML-RPC, move onto SOAP, WSDL, and UDDI. These topics are also covered in Web Services Essentials. For a comprehensive treatment of SOAP, check out O'Reilly's Programming Web Services with SOAP, by Doug Tidwell, James Snell, and Pavel Kulchenko.

    83. Question 83. What Is Soap? Explain Its Purpose.

      Answer :

      SOAP is the acronym for Simple Object Access Protocol. XML based messages over a network of computers are exchanged by using SOAP standard, using HTTP.
      SOAP purpose:
      A web service needs a combination of XML, HTTP and a protocol which is application-specific. A web service uses XML data for exchanging. The weather service, stock quote service, look up service of postal department are all sending XML messages and receiving an XML reply. This is the pattern that dominates the web services. To perform these web services, SOAP is the reliable protocol. 

    84. Question 84. Give Examples Where Soap Is Used?

      Answer :

      Remote methods over multiple platforms and technologies are used with HTTP. SOAP is XML based protocol and platform-agnostic. Each application uses different technology. This may cause problems with proxy server and firewalls. SOAP is the solution for this situation.

      Industries transport the request for finding best route and best cost price. So the application transfers a request to other similar services which uses SOAP.

    85. Question 85. What Are Transport Methods In Soap?

      Answer :

      Application layer and transport layers of a network are used by SOAP. SMTP and HTTP are the valid application layer protocol uses as transport for SOAP. Wider acceptance is gained by HTTP, as it works better with the current internet infrastructure, especially with firewalls.

    86. Question 86. What Is The Function Of Smon?

      Answer :

      The SMON background process performs all system monitoring functions on the oracle database. Each time oracle is re-started, SMON performs a warm start and makes sure that the transactions that were left incomplete at the last shut down are recovered.

      SMON performs periodic cleanup of temporary segments that are no longer needed.

    87. Question 87. Explain Different Types Of Segment.

      Answer :

      There are four types of segments used in Oracle databases:
      - data segments
      - index segments
      - rollback segments
      - temporary segments

    88. Question 88. What Is In Operator?

      Answer :

      IN operator in a query allows you to have multiple values in a WHERE clause.

    89. Question 89. What Is Like Operator?

      Answer :

      LIKE in oracle enables the user to search for a string of the matching type. “%” is used as a wild card in the query.

    90. Question 90. Define Is Null Operator.

      Answer :

      IS NULL operator is usually used to check if a columns value is NULL or not.

    91. Question 91. What Is Nvl() Function?

      Answer :

      Oracle deals with Null values using NVL function. The function replaces the NULL value in the given column with the value provide to it. The function accepts two parameters, the first one is the column name and the second one is the value with which NULL has to be replaced.
      Example
      Select Amount – NVL(Disc, 0) from Price

    92. Question 92. Describe The Role That Xsl Can Play When Dynamically Generating Html Pages From A Relational Database.

      Answer :

      Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so that it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.

    93. Question 93. Give A Few Examples Of Types Of Applications That Can Benefit From Using Xml.

      Answer :

      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.

    94. Question 94. How Do I Override A Default Xml Namespace Declaration?

      Answer :

      To override the current default XML namespace, you simply declare another XML namespace as the default. For example, in the following, the default XML namespace is the http://www.google.org/ namespace on the A and B elements and the http://www.bar.org/ namespace on the C and D elements. That is, the names A and B are in the http://www.google.org/ namespace and the names C and D are in the http://www.bar.org/ namespace.
      <A xmlns=”http://www.google.org/”>
      <B>
      <C xmlns=”http://www.bar.org/”>
      <D>abcd</D>
      </C>
      </B>
      </A>
      Using multiple default XML namespaces can lead to documents that are confusing to read and should be done carefully.

    95. Question 95. How Do I Override An Xml Namespace Declaration That Uses A Prefix?

      Answer :

      To override the prefix used in an XML namespace declaration, you simply declare another XML namespace with the same prefix. For example, in the following, the google prefix is associated with the http://www.google.org/ namespace on the A and B elements and the http://www.bar.org/ namespace on the C and D elements. That is, the names A and B are in the http://www.google.org/ namespace and the names C and D are in the http://www.bar.org/ namespace.
      <google:A xmlns:google=”http://www.google.org/”>
      <google:B>
      <google:C xmlns:google=”http://www.bar.org/”>
      <google:D>abcd</google:D>
      </google:C>
      </google:B>
      </google:A>
      In general, this leads to documents that are confusing to read and should be avoided.

    96. Question 96. Where Can I Declare An Xml Namespace?

      Answer :

      You can declare an XML namespace on any element in an XML document. The namespace is in scope for that element and all its descendants unless it is overridden.

    97. Question 97. What Is The Difference Between Versions 1.0 And 1.1 Of The Xml Namspaces Recommendation?

      Answer :

      There are only two differences between XML namespaces 1.0 and XML namespaces 1.1:
      * Version 1.1 adds a way to undeclare prefixes. For more information,
      * Version 1.1 uses IRIs (Internationalized Resource Identifiers) instead of URIs. Basically, URIs are restricted to a subset of ASCII characters, while IRIs allow much broader use of Unicode characters.

    98. Question 98. What Is The Relationship Between Xml Namespaces And The Xml 1.0 Recommendation?

      Answer :

      Although the XML 1.0 recommendation anticipated the need for XML namespaces by noting that element type and attribute names should not include colons, it did not actually support XML namespaces. Thus, XML namespaces are layered on top of XML 1.0. In particular, any XML document that uses XML namespaces is a legal XML 1.0 document and can be interpreted as such in the absence of XML namespaces.

    99. Question 99. Do Xml Namespaces Apply To Entity Names, Notation Names, Or Processing Instruction Targets?

      Answer :

      No.
      XML namespaces apply only to element type and attribute names. Furthermore, in an XML document that conforms to the XML namespaces recommendation, entity names, notation names, and processing instruction targets must not contain colons.

    100. Question 100. Are The Names Of All Element Types And Attributes In Some Xml Namespace?

      Answer :

      No.
      If an element type or attribute name is not specifically declared to be in an XML namespace — that is, it is unprefixed and (in the case of element type names) there is no default XML namespace — then that name is not in any XML namespace. If you want, you can think of it as having a null URI as its name, although no “null” XML namespace actually exists. For example, in the following, the element type name B and the attribute names C and E are not in any XML namespace:
      <google:A xmlns:google=”http://www.google.org/”>
      <B C=”bar”/>
      <google:D E=”bar”/>
      </google:A>

    101. Question 101. What Is An Xml Namespace?

      Answer :

      An XML namespace is a collection of element type and attribute names. The collection itself is unimportant — in fact, a reasonable argument can be made that XML namespaces don’t actually exist as physical or conceptual entities . What is important is the name of the XML namespace, which is a URI. This allows XML namespaces to provide a two-part naming system for element types and attributes. The first part of the name is the URI used to identify the XML namespace – the namespace name. The second part is the element type or attribute name itself — the local part, also known as the local name. Together, they form the universal name. This two-part naming system is the only thing defined by the XML namespaces recommendation.

    102. Question 102. Can I Still Use Server-side Inclusions?

      Answer :

      Yes, so long as what they generate ends up as part of an XML-conformant file (ie either valid or just well-formed). Server-side tag-replacers like shtml, PHP, JSP, ASP, Zope, etc store almost-valid files using comments, Processing Instructions, or non-XML markup, which gets replaced at the point of service by text or XML markup (it is unclear why some of these systems use non-HTML/XML markup). There are also some XML-based preprocessors for formats like XVRL (eXtensible Value Resolution Language) which resolve specialised references to external data and output a normalised XML file.

    103. Question 103. Can I (and My Authors) Still Use Client-side Inclusions?

      Answer :

      The same rule applies as for server-side inclusions, so you need to ensure that any embedded code which gets passed to a third-party engine (eg calls to SQL, VB, Java, etc) does not contain any characters which might be misinterpreted as XML markup (ie no angle brackets or ampersands). Either use a CDATA marked section to avoid your XML application parsing the embedded code, or use the standard <, and & character entity references instead.

Xml Tutorial

Xml Practice Tests

Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

XML Tutorial