Seventh week assignment is temporarily filed in the morning and changed to XML.

Source: Internet
Author: User
Tags xml cdata xml parser xml stylesheet xsl file xslt


of XMLImportant areas, such as DTDs, XML schemas, XSLT transformations, XPATH retrievals, XML bindings, XML parsing
The basics of XML, such as namespaces, checksums, attributes, elements, and so on.
1XMLWhat is it?
XML Extensible Markup Language (extensible Markup language), you can extend the XML to your own needs.
<books&gt can be easily defined in XML, custom labels such as <orders>, and in other markup languages such as HTML, must be made
Use predefined tags, such as <p&gt, instead of user-defined tags. Using DTD and XML Schema Normalization
XML structure. XML is primarily used for data transfer from one system to another, such as the client of an enterprise application and
Service side.
2DTDAndXML SchemaWhat's the difference?
The DTD differs from the XML schema in that the DTD is not written with XML and the XML schema itself is XML
XML parser and other XML tools that can be used to process XML schemas. And the XML Schema is
Designed after a DTD, it provides more types to map different data types of XML files. DTD is a document class
Type description (document type definition) is the traditional way to define the structure of an XML file.
3XPathWhat is it?
XPath is an XML technique that is used to retrieve elements from an XML document. XML documents are structured, so XPath can
To locate and retrieve elements, attributes, or values from an XML file. XPath is similar to SQL in terms of data retrieval, but
Is that it has its own grammar and rules. Learn more about how to use XPath to retrieve data from an XML document.
4XSLTWhat is it?
A: XSLT is also a common XML technique used to convert an XML file to another XML, HTML, or other
The format. XSLT defines its own syntax, functions, and operators in detail for the transformation XML file. Usually finished by the XSLT engine
Into transformations, the XSLT engine reads the instructions of an XML stylesheet or XSL file written by the XSLT syntax. XSLT uses a lot of recursion
Return to perform the conversion. A common XSLT use is to display the data in an XML file as an HTML page. XSLT Also
It is convenient to convert one XML file to another XML document.
5: What isXMLElements and attributes
It's best to give an example to explain. The following is a simple XML fragment.
<Orders>
<order id= "123" >
<Symbol>6758.T</Symbol>
<Price>2300</Price>
<Order>
<Orders>
In the example, the ID is an attribute of the element, and no other element has a property.
6: What is well-formedXML
This problem is often seen in telephone interviews. A well-formed XML means that the XML document is syntactically
For example, it has a root element, all open tags are properly closed, attribute values must be quoted, and so on. If a
XML is not well-formed, it may not be handled and parsed correctly by various XML parsers.
7XMLWhat is a namespace? Why is it important?
The XML namespace is similar to the Java package, and is used to avoid conflicting labels with the same name as different sources.
The XML namespace is defined with the xmlns attribute at the top of the XML document, with the syntax xmlns:prefix= ' URI '. Prefix and
Used in conjunction with the actual tags in the XML document. The following example is the use of an XML namespace.
<root xmlns:inst= "Http://instruments.com/inst"
<inst:phone>
<inst:number>837363223</inst:number>
</inst:phone>
</root>
8DOMAndSAXWhat is the difference between parsers
This is also a common interview problem, not only in the XML interview questions, in the Java interview will be asked. DOM and
The main difference between SAX parsers is how they parse XML documents. With DOM parsing, the XML document is tree-shaped
structure is loaded into memory, and SAX is an event-driven parser. More detailed answers to this question view DOM
and the SAX parser.
Problem9XML CDATAWhat is it
A: The problem is simple and important, but many programmers don't know much about it. CDATA refers to character data, which

There are special directives that are parsed by the XML parser. The XML parser parses all the text in the XML document, such as <name>this
is name of Person</name> the value of the label is also parsed, because the tag value may also contain XML tags, such as
<name><firstname>first name</firstname></name>. CDATA parts are not parsed by the XML parser.
CDATA section with <! [cdata[begins, ends with]]>.]
ProblemTenJavaOfXMLWhat is Data binding
A: Java's XML binding refers to the creation of classes and objects from XML files, and the use of the Java programming language to modify XML documents. Xml
Bound Java APIs, JAXB provides a convenient way to bind XML documents and Java objects. Another optional XML binding
The method is to use an open source library, such as XML Beans. One of the biggest benefits of XML binding in Java is the use of Java
Programming ability to create and modify XML documents.
The above XML interview questions are collected from many programmers, but they are useful to everyone who uses XML technology
Of Because XML has platform-independent features, XML technologies such as XPath, XSLT, and XQuery are becoming increasingly important, and XML
Widely used for cross-platform data transfer. Although XML has drawbacks such as redundancy and large document size, it is in Web services and with
The data transfer between the system and the rate as a secondary factor is very important.

Seventh week assignment is temporarily filed in the morning and changed to XML.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.