What are the different kind of parsers used in XML?
Latest Answer: XML Parser is nothing but a interface between user and XML Document. XML Parsers are divided into 2 types1) DOM (Document Object Module)2) SAX (Simple API for XML) ...
________________________________________
XPath
What is XPath?
Latest Answer: XPath describes where the items are located in a xml files For ExampleXYZ----path for this is employees/name 3 rd mg road ---path--employees/address/street ...
________________________________________
Why this parser needed exactly over Html or Jsp pages
Why this parser needed exactly over Html or Jsp pages, These two are enough for viewing the page. Can I know more sophisticated reasons from u?
SqlConnectionClass
which of the following is correct Q) ReadXml method belongs to the class of .............. NameSpacea)System.Datab)System.Data.SqlClientc)System.xmldSystem.Data.xml
Latest Answer: System.Data ...
________________________________________
Difference between XML and HTML
Write five difference between XML and HTML
Latest Answer: 1) XML is not a replacement for HTML. 2) XML and HTML were designed with different goals. 3) XML was designed to describe data and to focus on what data is. 4) HTML was designed to display data and to focus on how data looks. 5) HTML is about displaying ...
XML and Binary Serialization
What is XML Serialization and Binary Serialization? Where it actually used?
Latest Answer: Adding to above responses, XMLSerialization is called Shallow Serialization because it can serialize only public fieldsSoap Serialization and Binary Serialization techniques are called Deep Serialization because it serialize the object containing reference ...
________________________________________
XML to Oracle
How do you load data from XML file to a ORACLE table?
Latest Answer: This is from XML to sqlserverexce sp_xml_preparedocument @inthandle int output,@xmldocumentselect * from openxml(@inthandle,'/root/customer',2)with (customerid varchar(10), contactname varchar(20))exec sp_xml_removedocument ...
When there is HTML for presentation why are you going for XML?
Latest Answer: XML and HTML were designed with different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks.That is HTML is about displaying information, while XML is about describing ...
What are the different kinds of tags available in XML?
Latest Answer: In XML all the tags are user defined only. ...
________________________________________
What is a Processing Instruction in XML?
Latest Answer: An XML file can also contain processing instructions that give commands or information to an application that is processing the XML data. Processing instructions have the following format: target is the name of the ...
________________________________________
What is the use of "?
Latest Answer: XML Prolog: The XML declaration is essentially the same as the HTML header, , except that it uses and it may contain the following attributes: version: Identifies the version of the XML markup language used in the data. ...
________________________________________
What are the rules for making a tag name in XML?
Latest Answer: Rules for making a tag name are1.It should start with a letter or underscore(_)2.There are no reserved words , but however xml(in any case) should not be used as a tag name3.It can include digits, hyphen,periods, ':' can be used but best ...
________________________________________
What is a CDATA section in XML?
Latest Answer: CDATA is used to store plain text or string values. It is commonly used with implied attributes, which allows user to define their own values. For example, ...
________________________________________
Where is Schemas specified in XML?
Latest Answer: static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema"; Next, you ...
Why is XML referred as self-describing data?
Latest Answer: XML tags are not defined. XML uses DTD or schema to describe the data.becoz of DTD and schema it is self-descriptive. ...
________________________________________
What is the notation used for defining an empty XML element?
Latest Answer: eg. Now type can store empty elements in it. ...
________________________________________
What is the use of xml.onload property?
Latest Answer: The element defines a script to be executed when the AppML application loads in a browser.Used in conjunction with the form element. ...
________________________________________
What is entity referencing?
Latest Answer: Referencing the entity by name causes it to be inserted into the document in place of the entity reference. To create an entity reference, the entity name is surrounded by an ampersand and a semicolon, like this: &entityName; ...
How would you do XML testing of two incompatible systems in web application processing.How to test the
How would you do XML testing of two incompatible systems in web application processing.How to test the request and response of a web application.
How do you say XML is secured language on the information exchange over the network?
Latest Answer: Actually it isnt. XML may be eay to write and even parse, but the use of XML as a medium of B2B data interchange is still bleak. XML is used mainly for Application integration as it is just within the organisation and where major security issues will ...
1)which .net host doesn't support application domain a)iis b)INTERNET explorer c)shell executable
1)which .net host doesn't support application domain a)iis b)INTERNET explorer c)shell executable d)asp.net 2)in .net there is no deterministic destruction true/false 3).net runtime is having -------- type(s) of isolation4)how to implement 2 connect 2 a proxy with a remote service Please give me reply. 5)ow can we include unmanaged code into .net?
Other than XML/XSLT, what are other web services.
Latest Answer: i can explain this in detail. . First XML and XSLT are not webservices. . Webservices means any kind of service (functionality) that can be accessed by open std protocols like SOAP,WSDL and UDDI. And the basic platform is provided by HTTP and XML.. ...
How can you create an XML file?
Latest Answer: You can also create an XML file through the Java XML APIs and some simple Java.io File writer methods. Use the appendChild() method in the Node class for creating the tree structure of an XML. Use the FileWriter methods to save it into a file. ...
When a XML file has a DTD declared which is not accessible to the parser, what would happen?
Latest Answer: DTD is must. if the file is not found at location specified you will get following errorjava.io.FileNotFoundException: ....AddrBook.dtd (The system cannot find the file specified)       at org.apache.crimson.parser.Parser2.fatal(Unknown Source)       ...
What parser would you use for searching a huge XML file?
Latest Answer: Yes, SAX parser is better for huge XML files. ...
What are the differences between SAX and DOM parsers?
Latest Answer: The main difference between DOM and SAX is in the representation of the XML document they use. DOM uses an in-memory tree-like structure, whereas, SAX uses linear event driven approach. ...
What is a schema? What are the limitations of a DTD?
Latest Answer: Schema represents the Grammar of XMl document instanace used by Parser to check the well formed ness and validition of XML document instance with respect to schema we defined.In case of DTD it wont allow us to define our own datatype mean creating our ...
=============================================================================================================================
1. http://www.techinterviews.com/xml-interview-questionsWhat is the difference between SAX parser and DOM parser?
DOM:
creates an internal representation of an XML document
-Nice for smaller XML files, but because of the whole XML file
representation is in memory, it is possible not useful for
very large documents
-good for representation of an XML document.
—
SAX:
Event driven, so reacting when it finds certain elements in the XML
code (e.g. tags,
properties, …)
goes from top to bottom, and if it encounters
e.g. begintag, it fires an event.
e.g. end tag, it fires and event.
e.g. begin of file, it fires an event
1. 1.
DOM parser - reads the whole XML document and returns a DOM tree representation of xml document. It provides a convenient way for reading, analyzing and manipulating XML files. It is not well suited for large xml files, as it always reads the whole file before processing.
SAX parser - works incrementally and generate events that are passed to the application. It does not generate data representation of xml content so some programming is required. However, it provides stream processing and partial processing which cannot be done alone by DOM parser.
1. What is Xpath?
XPath is used to navigate through elements and attributes in an XML document
1. What is XSL?
XSLT - a language for transforming XML documents
XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML and XHTML. Normally XSLT does this by transforming each XML element into an (X)HTML element.
XPath - a language for navigating in XML documents
XSL-FO - a language for formatting XML documents
1. A DTD is:
The XML Document Type Declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition or DTD.
The DTD can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can even do both.
A Schema is:
XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents.
In summary, schemas are a richer and more powerful of describing information than what is possible with DTDs.
1. How Schemas Differ from DTDs
The first, and probably most significant, difference between XML Schemas and XML DTDs is that XML Schemas use XML document syntax. While transforming the syntax to XML doesn’t automatically improve the quality of the description, it does make those descriptions far more extensible than they were in the original DTD syntax. Declarations can have richer and more complex internal structures than declarations in DTDs, and schema designers can take advantage of XML’s containment hierarchies to add extra information where appropriate — even sophisticated information like documentation. There are a few other benefits from this approach. XML Schemas can be stored along with other XML documents in XML-oriented data stores, referenced, and even styled, using tools like XLink, XPointer, and XSL.
The largest addition XML Schemas provide to the functionality of the descriptions is a vastly improved data typing system. XML Schemas provide data-oriented data types in addition to the more document-oriented data types XML 1.0 DTDs support, making XML more suitable for data interchange applications. Built-in datatypes include strings, booleans, and time values, and the XML Schemas draft provides a mechanism for generating additional data types. Using that system, the draft provides support for all of the XML 1.0 data types (NMTOKENS, IDREFS, etc.) as well as data-specific types like decimal, integer, date, and time. Using XML Schemas, developers can build their own libraries of easily interchanged data types and use them inside schemas or across multiple schemas.
The current draft of XML Schemas also uses a very different style for declaring elements and attributes to DTDs. In addition to declaring elements and attributes individually, developers can create models — archetypes — that can be applied to multiple elements and refined if necessary. This provides a lot of the functionality SOX had developed to support object-oriented concepts like inheritance. Archetype development and refinement will probably become the mark of the high-end schema developer, much as the effective use of parameter entities was the mark of the high-end DTD developer. Archetypes should be easier to model and use consistently, however.
XML Schemas also support namespaces, a key feature of the W3C’s vision for the future of XML. While it probably wouldn’t be impossible to integrate DTDs and namespaces, the W3C has decided to move on, supporting namespaces in its newer developments and not retrofitting XML 1.0. In many cases, provided that namespace-prefixes don’t change or simply aren’t used, DTD’s can work just fine with namespaces, and should be able to interoperate with namespaces and schema processing that relies on namespaces. There will be a few cases, however, where namespaces may force developers to use the newer schemas rather than the older DTDs
1. How do you parse/validate the XML document?
The only way to validate an XML file is to parse the XML document using the DOM parser or the SAX parser
1. What is XML Namespace?
The XML namespaces recommendation defines a way to distinguish between duplicate element type and attribute names. Such duplication might occur, for example, in an XSLT stylesheet or in a document that contains element types and attributes from two different DTDs.
An XML namespace is a collection of element type and attribute names. The namespace is identified by a unique name, which is a URI. Thus, any element type or attribute name in an XML namespace can be uniquely identified by a two-part name: the name of its XML namespace and its local name. This two-part naming system is the only thing defined by the XML namespaces recommendation.
XML namespaces are declared with an xmlns attribute, which can associate a prefix with the namespace. The declaration is in scope for the element containing the attribute and all its descendants. For example:
abcd
If an XML namespace declaration contains a prefix, you refer to element type and attribute names in that namespace with the prefix. For example:
If an XML namespace declaration does not contain a prefix, the namespace is the default XML namespace and you refer to element type names in that namespace without a prefix. For example:
abcd
1.2) Can you give me an executive summary of what XML namespaces are not?
They aren’t a cure of cancer, they aren’t a way to win the lottery, and they aren’t a direct cause of world peace. They also aren’t very difficult to understand or use. Two things that XML namespaces are not have caused a lot of confusion, so we’ll mention them here:
XML namespaces are not a technology for joining XML documents that use different DTDs. Although they might be used in such a technology, they don’t provide it themselves.
The URIs used as XML namespace names are not guaranteed to point to schemas, information about the namespace, or anything else — they’re just identifiers. URIs were used simply because they’re a well-known system for creating unique identifiers. Don’t even think about trying to resolve these URIs. (For details, see question 12.4.)
1. XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.
1. Generating PDF from XML
Today, the most common application of XSL-FO is to produce Adobe PDF documents from the source XML files. Here is the two step process that is used to turn XML into PDF:
Step 1. XML to XSL-FO using XSLT:
The first step is to transform XML into XSL-FO format document. XSL-FO, like XSLT, makes use of XML syntax. The obvious choice here is to use XSLT to transform XML into XSL-FO. However, if you want, you can use some other method, such as DOM- or SAX-based processing the XML document, and generating XSL-FO document. In this article, we’ll use XSLT to transform XML into XSL-FO. XSLT transformation engine, such as MSXML, Xalan, Saxon, XT, etc. can be used to apply the XSLT stylesheet on the XML document.
XSL-FO document describes the details of the presentation, such as physical size of the page, pagination details, margins, fonts, font sizes, colors, and so on. These characteristics are expressed using XSL formatting objects (for example: fo:page-sequence, fo:block, fo:footnote, fo:float, fo:region-body, and so on) and formatting properties (for example: background-attachment, background-color, font-family, text-depth, and so on). If you are know CSS (Cascading Style Sheets), the XSL formatting properties should sound familiar, however it is important to realize that XSL-FO provides a more sophisticated layout model than the CSS, and that XSL-FO is specifically designed to be used for generating fine-grained presentational layout files.
Step 2. Processing XSL-FO using Formatting Engine (or Formatter):
Once you have the XSL-FO document, XSL rendering engine, such as FOP or XSL Formatter (see XSL-FO Tools section below) can be used to convert XSL-FO elements into a PDF, PostScript, RTF or any other such print format.
XSL-FO is not meant to be hand-coded. Generally, XSLT stylesheet will be written to transform XML into XSL-FO. The rendering engine is then used to convert XSL-FO into the required print documents. External resources (such as images and fonts) can be referred in the XSL-FO document. SVG elements can be used inside XSL-FO document to produce vector graphics (such as charts or maps).
1. 1. What is the difference between SAX parser and DOM parser?
DOM spec defines an object-oriented hieararchy.
The DOM parser creates an internal tree based on the hierarchy of the XML data.
Tree stays in memory until released. The DOM parser is more memory intensive. DOM Parser’s advantage is that it is simple. Pairs nicely with XSLT.
SAX spec defines an event based approach, calling handler functions whenever certain text nodes or processing instructions are found. These events include the start and end of the document, finding a text node, finding child elements, and hitting a malformed element. SAX development is more challenging. SAX can parse gigabytes worth of XML without hitting resource barriers. It’s also faster and more complex. Better for huge XML docs. Best suited for sequential-scan applications.
2. What is the difference between Schema and DTD?
Schema might outphase DTD. XML shemas are in XML. XML Schema has a lot of built-in data types including xs:string,xs:decimal,xs:integer,xs:boolean,xs:date,xs:time. XML schemas can be edited with Schema files, parsed with XML parser, manipulated with XML DOM, and transformed with XSLT.
The building blocks of DTD include elements, attributes, entities, PCDATA, and CDATA.
3. How do you parse/validate the XML document?
By using a SAXParser, DOMParser, or XSDValidator.
4. What is XML Namespace?
Defining a namespace to avoid confusion involves using a prefix and adding an xmlns attribute to the tag to give the prefix a qualified name associated with the namespace. All child elements with the same prefix are associated with the namespace defined in the start tag of an element.
5. What is Xpath?
XPath is a language for addressing parts of an XML document, designed to be used by both XSLT and XPointer.
6. What is XML template?
* A style sheets describes transformation rules
* A transformation rule: a pattern + a template
* Pattern: a configuration in the source tree
* Template: a structure to be instantiated in the result tree
* When a pattern is matched in the source tree, the corresponding pattern is generated in the result tree
7. How would you produce PDF output using XSL’s?
FOP it. =)
-transform xml into xsl-fo doc using xslt, or DOM or SAX
-process xsl-fo using a Formatter to convert xsl-fo into a pdf.
8. What are the steps to transform XML into HTML using XSL?
An XSLT processor may output the result tree as a sequence of bytes.The xsl:output element allows stylesheet authors to specify how they wish the result tree to be output. If an XSLT processor outputs the result tree, it should do so as specified by the xsl:output element; however, it is not required to do so.The method attribute on xsl:output identifies the overall method that should be used for outputting the result tree.
The html output method outputs the result tree as HTML; for example,
…
9. What is XSL?
In addition to XSLT, XSL includes an XML vocabulary for specifying formatting. XSL specifies the styling of an XML document by using XSLT to describe how the document is transformed into another XML document that uses the formatting vocabulary.
10. What is XSLT?
A language for transforming XML documents into other XML documents. XSLT is designed for use as part of XSL, which is a stylesheet language for XML.
==================================================================================================================
1. Can I use XML namespaces in DTDs?
2. Define DTD (Document Type definition).
3. Describe about the syntax rules which form the XML documents?
4. Differences Between XML and xlink?
5. Explain about DOM interface?
6. Explain about XML Canonicalization
1. Explain about XML data binding?
2. Explain about XML namespaces?
3. Explain about XML signature?
4. Explain about XQuery?
5. Explain about core validation?
6. Explain about the DTD features?
7. Explain about the techniques for processing XML files?
8. Give some examples of XML DTDs
9. Give the main reasons to use DTD?
10. Give us syntax rules of XQuery?
11. How can u create an XML file?
12. How do I configure an XPointer processor?
13. How do I implement an application-specific XPointer scheme?
14. How do I make a table which looks good on xlink and Prodigy?
15. How do I write my own DTD?
1. How do integrate XPointer into my application?
2. How do you create Drop Down Combos in xlink ?
3. How do you display XML with XSLT?
4. How do you load data from XML file to a ORACLE table?
5. How do you parse/validate the XML document?
6. How to add elements and attributes with XQuery in XML data?
7. How to declare DTD?
8. How to define functions in XQuery?
9. How to perform comparisons in XQuery?
10. How to perform conditional operations in XQuery?
11. How to perform operation on node using XQuery function in XML?Explain with an example?
12. How to use FLWOR expression given by XQuery in XML data?
13. How to use XPointer?
14. How would you produce PDF output using XSL’s?
15. How you define atomic values?
16. How you define syntax of XLink?
17. How you define syntax of XPointer?
18. How you define terms in XQuery?
19. How you use XQuery FLWOR with HTML?
20. List the rules to be followed by an XML document.
21. Other than XML/XSLT, what are other web services.
22. State and explain about XML encoding errors?
23. State some advantages of XML
24. State some disadvantages of XML?
25. State some features of XQuery.
26. WHich type of problems we can solved with XQuery?
27. What XPointer schemes are supported in this release?
28. What about xpointer resources?
29. What are XML indexes and secondary XML indexes?
30. What are the differences between SAX and DOM parsers?
31. What are the steps to transform XML into HTML using XSL?
32. What do you mean by selecting and Filtering elements in XQuery?
33. What is DOM?
34. What is DTD?
35. What is XLink ?
36. What is XML Namespace?
37. What is XML Serialization and Binary Serialization?
38. What is XML data binding?
39. What is XML template?
40. What is XML?
41. What is XMLA ?
42. What is XPointer?
43. What is XQuery?
44. What is XSL?
45. What is XSLT?
46. What is Xpath?
47. What is a CDATA section in XML?
48. What is a schema? What are the limitations of a DTD?
49. What is an XML encoding error?
50. What is server-side XPointer?
51. What is the difference between SAX parser and DOM parser?
52. What is the difference between Schema and DTD?
53. What is the purpose of FOR XML in SQL Server?
54. What is the use of Xlinks Modularization?
55. What parser would you use for searching a huge XML file?
56. When a XML file has a DTD declared which is not accessible to the parser, what would happen?
57. When constructing an XML DTD
58. Why doesn't use XLink?
59. Why should I care if my document is in correct x link? It displays all right on my browser.