XML entry must be read

xiaoxiao2021-03-05  27

XML entry must be read

1. What is XML? XML developers will tell you that XML is not a language, but a system for defining other languages. Maybe you have already heard, may even try some language-such as Microsoft's Channel Definition Format, which is pushing (PUSH) technology. W3C is a developer of some public standards on interconnect, and he has introduced a series of XML-related standards and drafts. They describe XML into "a universal syntax used to express structure data." The so-called structured data refers to the data defined by the label (tags). For example, in the definition of HTML, the text defined by the

tag will be displayed in a specific font and size. An XML tag will clearly determine a message: tag may indicate the author of the document, and may contain the price of the product. Unlike the tab in HTML: The meaning of the XML tag is customized. If you like, you can use to express the author information, and use to represent product prices. Although this seems to be tapped, it is definitely correct. By separating the structure and data, a XML document can be written, it can be applied in a variety of different purposes: displayed on the computer screen, or displayed on the phone screen, or being turned to the blind designed voice device On, wait, many functions, not enough. It can hardly work on any possible communication device. At this time, the role of an XML document is far beyond what you think so, just a simple document used to display the content. In this way, XML can be able to show in other places in addition to the interconnection network. In some large document makers, SGML is the language they used for many years, but it is too complicated, just 400 pages of definitions. The emergence of XML has also created some opportunities for them. In fact, XML is a streamlined subset of SGML. Most of the work of SGML can be done by XML, while XML is much simpler than SGML. Of course, the platform-independent XML is originally designed for the web, which will also have the greatest impact on the Web. The DOM (Domument Object Model) is a programming interface that defines how to perform data access in a document. XML can do for the web, to a large extent, how it is interacting with the DOM (Document Object Model). With DOM, programmers can use a standard way to dynamically operate the contents of the document and some properties. In other words, programmers can make some specific actions in one of a browser's document object tree. For example: When the mouse is moved to a small text, it changes the color. Both Navigator and Microsoft Internet Explorer of Navigator and Microsoft Internet Explorer have defined a DOM, but both companies have announced the standard DOM of W3C in their next version browser. This will bring a lot of convenience to the programmer. 2. Why is XML important? A very important principle in the web is: Content is the most priority of a website. But unfortunately, the content always contacts them in this area. When you browse the web, how many times, I see a small label, which is written "Best to browse this website at 800 * 600 resolution"? Numbers! XML will help solve this problem. Because in XML, the website builders are no longer specified in what is displayed on the web page, what they need to do is to define the structure of a document.

For example, you need to define the title of the document, the author, a series of related links, etc. Any device equipped with an XML browser - a handheld computer, or this is a TV set-top box, or a high-performance workstation, etc. - to display the contents of the XML document according to the display characteristics of each device. Perhaps the strongest characteristics of XML lies in its intrinsic scalability. Any company and organization can extend XML to achieve new applications. Nowadays, it is now based on the application of XML applications almost every day. Some XML-based languages ​​have begun to be used, such as Microsoft channel definition format - and some are being developed, including resource definition format, and Open Software Description (Open Software Descriptive), etc. XML is also very likely to be a standard for data and document exchange mechanisms. For example, you can use XML to implement information exchange between different databases on the Internet. So far, it is necessary to accurately illustrate that XML's public seems to be too early. However, the possibility of it is unlimited, maybe this is why XML can be able to pay attention to this early days. 3. What is the relationship between SGML, HTML and XML? SGML, Standard Generalized Markup Language is the first to describe data in rewording. Like RTF (rich text) file, Word's DOC file, etc., you can see examples of SGML. If you open an RTF file with Notepad, you can see some things similar to HTML, that is, the source data of RTF is defined by SGML. SGML has been in the past 10 years since the birth, which can be said that it has been developed very mature. The XML and HTML can be considered SGML discontals, they are all document formats from SGML. So they all have some common features, such as similar grammar, use a sharp bracket tag, and so on. But accurately, HTML is an application of SGML, and XML is a streamlining subset of SGML. This difference is essentially in nature. Simply put, HTML cannot be used to define (or derived) a new application, while XML can do it. For example, resource description format and channel definition format are new applications defined by XML. In theory, the HTML can even be rewritten with XML. For the relationship between them, W3C gives an image (see figure), which is vividly illustrated. XML is actually compatible with SGML -XML documents that can be parsed by any SGML editing and browser. However, XML is simpler than SGML, and he is specially designed for Internet of Internet. TIM BRAY is one of the XML standards, according to his statement, XML is to inherit the advantages of SGML, but go to SGML complexity and make it a good job on the Internet. HTML, SGML, and XML will hold their own positions in a certain period of time, and there will be no one will be eliminated by other. HTML is still the most efficient way of publishing information online. If the data to be published has long-term application value and requires some structured content, the website constructor should consider the use of XML. Unlike HTML and XML, SGML will not be widely agreed online because it is not specifically designed for online transmission. But for high-end applications, those highly structured document applications, SGML will still play a role. 4. How is XML to be implemented? XML can be applied to many different aspects.

One of them is used to exchange information between people and machines, such as explaining the information from a website server to browse to the user browser. There is data exchange between different machines, different systems, and different applications. In the above two applications, you may need a three-layer pattern each frame: a database server is a layer, used to store data. A server as an intermediate layer, is used to properly explain and express data, followed by the client, data is displayed, and can do further applications. The database server can receive information from multiple data sources, perhaps they have existing as an XML format. The intermediate layer can integrate all the data and send it to the client. Now, a lot of web pages are generated. Also, a relatively good XML document of a constructor can allow the client program to modify the outer end of the document to display in different media, such as printing out in the printer. 5. What is DTD? A document type definition is a set of labels syntax definitions. It tells you that in an XML document you can use those order, label appearance, and can use those properties, etc. DTD is first working in SGML, and DTD is also introduced in XML, but it is not necessary to constitute an XML document. Moreover, it usually does not appear together in one document together with XML (of course, it can be together), but in a separate DTD file, such a separate DTD can be referenced by multiple XML files. Because XML itself is not a language, but used to define standard methods in other languages, he does not have a universal DTD like HTML. Thus, each company and individual who want to use XML can define its appropriate DTD to meet different requirements. There are also many debates on DTD. Some people think it is very important, it is the most substantive thing. Some people have restricted creativity, and some people think it is useful, but it is not enough. Microsoft tried to end these debates with his XML-DATA, but critics believe that it should be improved from the nature of DTD. Microsoft's SCHEMA includes some companies in Microsoft, which proposes a DTD instead of some of the issues of DTD, called Schema, and has been submitted as XML-DATA to W3C. Similar to DTD, a Schema provides some rules about documents and gives properties between labels, properties, and tags that can be used, and so on. However, different from DTD is that SCHEMA can be used to define data types. For example, if a label named is defined in the DTD, the content included in the tag can be a number or a string. However, if you use Schema, you can force the content entered to be only numbers without entering other types of data. This approach is obviously effective, especially when exchange data between different applications, objects, or databases. The only question is: can SCHEMA be part of the DTD standard, or just a separate XML extension. 6. What is a Well-Formed and Valid documentation? There are two types of XML documents in nature: Well-FORMED (well-structured) and Valid (effective). A well-structured XML document complies with the general rules of XML syntax. This rule is more strict than HTML and SGML. HTML's grammar rules have a lot of arbitrariors, often there may be some omissions and irregular ways to exist.

However, the XML document is unable to say, must be strictly written by XML document with XML grammar rules. Hereinafter, several rules should be followed by the Well-Formed XML: 1. The first column of the XML file must be an XML document declaration; 2. There can only be one root node in the XML file. 3. Start label and end label must be called. 4. Empty labels must have a "/" symbol. 5. The first label cannot cross the appearance, and the neo-shaped structure must be satisfied. 6. The case of English is different. 7. Attributes must surrounded by double quotes. 8. Special characters have special expressions, including "&", "<", ">", "" '"these five characters. A valid XML document is more stringent than structureful XML documentation requirements In addition to meeting all the eight rules listed above, it must also comply with a definition of a DTD document. The DTD said that DTD is not required for an XML, but for an effective XML document, there must be a corresponding DTD definitions existent. Verify that the effectiveness of the XML document is largely issued, and the problem to be considered. For a general XML browser, to show XML content, only need to meet Well-Formed Definitions can be. 7. How is the browser interpret the XML document? Tools used to interpret XMLs are generally called XML analyzers (Parser), but its official name should be an XML processor (processor) .xml Applications that use to write, publish, search, or display. XML do not provide an API (application interface) to control its behavior, he just passes the parsing XML document to the application. Of course As mentioned earlier, XML is not parsed for XML documents that do not meet the Well-Formed condition. Netscape and Microsoft have built XML parsers in their latest version of the browser. This way, when XML is When passing to the client browser, first pass the parser, then pass it to the browser to display the content. 8, RDF, CDF, and XML relationships? If XML has the ability to say something, then XML applications can be seen as the specific language. RDF (Resource Description Format) is a XML application. It is also a language, just complying with XML grammar, derived from XML .Rdf is a method for ordering and accessing data. This means that RDF is data about data, or called metadata. This metadata can be used to establish standards. Site map, get more accurate search results, and grading order of the site main body. RDF can also be used to create a smart bookmark, when the web address referenced by the bookmark changes, the bookmark itself can automatically change. This is The website is often updated by the website. For the construction of the website, it is very simple but able to get a lot of things for the construction of the website. Similarly, CDF is also a .cdf (Channel Definition). CHANNEL Definition Format is proposed by Microsoft and vigorously advocates. Through its XML parser, Internet Explorer 4.0 can read the CDF file and more content related to page extraction. This is The "push" technology. Net view also has the corresponding "push" technology, but in the grammatical composition, it is not the same as Microsoft's CDF.

9. What is the relationship between style pages and XML? Since XML is separated by content and performance, website designers need a new way to control layout and appearance display. The style is coming at this time. To now, there are three different style pages to work with XML, they are: 1. Cascading Style Sheets (CSS). 2. Extensible Style Language (XSL). 3. Document Style Semantics and Specification Language (DSSSL). XML is very good for current CSS standards, and CSS can also complete most of the basic style and shape settings. However, CSS does not meet some high-end applications. At this time, there may be more requirements to help DSSSL, this ISO standard. It has worked well with XML's ancestors, and now there is certainly no problem to deal with XML. Particularity of online transmission. Thus, the rest is XSL, it is basically designed for XML. Now XSL is a motion as a W3C needs to be discussed, so now there is only support in IE5, and other browsers don't know XSL. XSL gives web designers and users with greater flexibility, and many of its features are not imaginated in HTML. For example: HTML

tag is displayed in all browsers, but in XSL, the social reporter can specify any of the page elements to display them in their thoughts. The user can also determine the

to display by personal settings. XSL is designed to work with some scripting languages ​​such as JavaScript. You can even write such scripts: "If an attribute value of an XML element = 10 dam makes it green, Else makes it displayed in blue, and so on. With XSL, XML is omnipotent. 10. XML has those improvements to the hyperlink? XML has made some improvements to HTML hyperlinks, increasing some features, including the establishment of "smart" links, can save a lot of trouble to manually write JavSSCRIPT. In XML, the link is a convenient operation of the hyperlink as an object that occurs as an object. The original standards for links - XLL, XML LANGUAGE are now divided into two new standards: XPointer and XLink. XPointer: In HTML, you can pick up a page from a bookmark. You will be able to "address to" (instead of "link to (not" link to (link to)) any part of the other pages. Obviously, this is very useful for documentation. XLINK: When the user clicks on a hyperlink in HTML, the current web page is replaced by a new web page. XLINK enables web developers to add some action for link objects. For example: In now, you must use JavaScript to display the link to the page in a new window, but XLINK has added some behaviors to the link object, and the pop-up window is easy to simply call the object. Other useful applications, like a warning dialog that is popped up, a user who needs a confirmation of a confirmation, and the like, can be easily implemented by XLINK's object mechanisms. But now, we also have to help script programming can be resolved.

转载请注明原文地址:https://www.9cbs.com/read-33609.html

New Post(0)