• xml language. XML syntax

    Today we will begin to consider a very popular and convenient XML markup language. Because this format Data representation is very flexible and universal, and it can be used almost anywhere, meaning in connection with something. Therefore, a novice programmer will sooner or later have to deal with this language, and it doesn’t matter what exactly you do, be it web programming or database administration, because everyone uses XML, and you will also use it to implement the tasks you need.

    We will start, as usual, with theory, let's look at what kind of language it is, why it is good, how to use it and where it is used.

    XML Language Definition

    XML (eXtensible Markup Language) is a universal and extensible data markup language that is independent of the operating system and processing environment. Xml is used to present certain data in the form of a structure, and you can develop this structure yourself or customize it for a particular program or service. That's why given language They call it expandable, and this is its main advantage, for which it is so valued.

    As you know, there are quite a lot of markup languages, for example, the HTML language, but all of them, one way or another, depend on the processor, for example, the same html, the code of which the browser parses, is standardized and not extensible, there are clear tags there, syntax that cannot be violated, and in xml you can create your own tags, i.e. your markup. The main difference between HTML and XML is that html just describes the markup for displaying data, and xml is an abstract data structure that can be processed and displayed as you wish, anywhere, and therefore there is no need to compare these languages, they have completely different purposes.

    As noted above, xml is a very common and universal language, through which almost all applications, both web and just for the computer, use it as an exchange of information, since with the help of it you can very easily exchange data between applications or services that are even written in different languages. In this connection, every novice programmer who is involved in absolutely any programming should have an understanding of XML. If you want to become a web master, then you simply must know XML, and we have already discussed how to become a WEB Master and what you need to know for this.

    For example, I once had a task to write a certain service that should return data in xml form upon request, i.e. a kind of development of the server part of the application, and I had no idea what the client that would process this data was written in, and that I wrote a service that returned the data in xml form and that’s it, the application worked perfectly. And this is just an example that I had to deal with, but now imagine how many different organizations collaborate and conscientiously develop software and exchange data, and I would not be surprised that this data will be in xml form.

    For example, I once had a task to write a certain service that should return data in xml form upon request, i.e. a kind of development of the server part of the application, and I had no idea what the client that would process this data was written in, and that I wrote a service that returned the data in xml form and that’s it, the application worked perfectly. And this is just an example that I had to deal with, but now imagine how many different organizations collaborate and conscientiously develop software and exchange data, and I would not be surprised that this data will be in xml form.

    Also, I once had to store xml data in a MS SQL 2008 database in order to better represent this data and exchange it between the server and the client part of the application, we discussed this in the article - Transact-sql - working with xml.

    The XML language itself is very simple, and it is simply impossible to get confused in it; all the complexity arises precisely in the processing and interaction of XML with other applications, technologies, i.e. everything that surrounds xml, which is where you can easily get confused.

    Today we are talking only about the basics of XML, and we will not focus on technologies for processing and interacting with this language, since this is true, very voluminous material, but I think in the future we will continue to get acquainted with related technologies.

    Let's move on to practice. And I will write all the examples that we will consider in Notepad++ only because it is very convenient, but we will not talk about this now, since we have already discussed this in the article - Why Notepad++ is good for a novice developer.

    XML tags

    XML language uses tags ( tags are case sensitive), but not the same tags as in html, but those that you come up with yourself, but the xml document also has a clear structure, i.e. there is an opening tag and a closing tag, there are nested tags and, of course, there are values ​​that are located in these tags. In other words, everything you need for basic knowledge xml is just to follow these rules. Together, the opening, closing tag and value are called an element, and the entire xml document consists of elements that together form a data structure. An xml document can only have one root element, remember this, because if you write two root elements, it will be an error.

    And it’s time to give an example of xml markup, and the first example for now is for syntax:

    <Начало элемента> <Начало вложенного элемента>Nested element value

    As you can see, everything is quite simple, and there can be a lot of such elements nested within each other.

    Now let's give an example of a real xml document:

    As you can see, I just gave an example of a kind of book catalog here, but I did not declare this document, i.e. I didn’t write an XML declaration that tells the application that will process this data that the xml data is located here and in what encoding it is presented. You can also write comments and attributes, so let's give an example of such a document:

    Book 1 Ivan Just book 1 Book 2 Sergey Just book 2 Book 3 Novel Just book 3

    Where the first line is the declaration that this is an XML document and must be read in UTF-8 encoding.

    This data without processing will look, for example, in a browser (Mozilla Firefox) as follows:

    I hope you understand that here catalog is the root element, which consists of the book elements, which in turn consists of the name, author and comment elements, and for the example, I also set several attributes for the catalog element and the book element.

    For the basics, I think that's enough, because if we dive deeper and deeper into XML, and into all the technologies that are associated with this language, then this article will never end. So that's all for today. Bye!

    XML (Extensible Markup Language) was developed by the XML Working Group of the World Wide Web Consortium (W3C). Here's how its creators describe it:

    “Extensible Markup Language (XML) is a component of SGML... It is designed to make SGML easier to use on the Web and perform tasks that are currently accomplished using HTML. XML is designed to improve the use and interoperability of SGML and HTML."

    This is an excerpt from the XML specification version 1.0, created by the XML Working Group in February 1998. The entire document can be found on the W3C website at http://www.w3.org/TR/REC/-xml.

    XML is a markup language designed specifically for placing information on the World Wide Web, similar to hypertext language HTML markup(Hypertext Markup Language), which initially became the standard language for creating Web pages. Since HTML completely satisfies all our needs, the question arises: why was a completely new language needed for the Web? What are its advantages and advantages? How does it interact with HTML? Will it replace HTML, or just improve upon it? Finally, what is SGML, of which XML is a part, and why can't SGML itself be used for Web pages? In this chapter I will try to answer all these questions.

    Purpose of XML

    The HTML language provides a fixed set of elements that you can use to place components on a typical Web page. Examples of such elements include headings, paragraphs, lists, tables, images, and links. For example, HTML is great for

    creating a personal home page. Below is the description of the home page in HTML codes:

    Home Page

    Michael Young's Home Page

    Welcome to my Web site!

    Web Site Contents

    Please choose one of the following topics:

    • Writing
    • Family
    • Photo Gallery

    Other Interesting Web Sites

    Click one of the following to explore another Web site:

    • "1. XML should become the language of direct use on the Internet."

      As you might have guessed, XML was designed primarily for storing and distributing information on the Web.

      "2. XML will support a large number of applications."

      Although its primary purpose is to distribute information on the Web through servers and browser programs, XML is also designed to be used by other programs. For example, XML is used to exchange information between financial programs, to distribute and update software products, and to write voice scripts when delivering information over the phone.

      "3.XML will be compatible with SGML."

      XML is a specialized branch of SGML. The advantage here is ease of adaptation software SGML for working with HTML.

      "4. It will be easier to write programs that process XML documents."

      To make practical use of XML, it is necessary that it be fairly easy to write browsers and other programs that process XML documents. In fact, the main reason for separating XML from SGML was the ease of writing programs to process XML documents.

      "5. Quantity additional functions in XML should be minimal, and ideally zero.”

      The minimal number of additional functions in XML makes it easy to write programs to process XML documents. The abundance of additional plug-in functions in SGML was the main reason that determined its practical unsuitability for representing Web documents. Additional SGML features require overriding delimiter characters for tags (usually ) and skipping the end tag so that the processor detects the end of the element. When strictly writing an SGML document processing program, it is necessary to take into account the possibility of all additional functions, even if they are rare.

      "6. XML documents should be clear and understandable to the user."

      XML is intended to become the lingua franca (universal language) for exchanging information among users and programs around the world. According to this concept, users, as well as specialized programs, should be able to create and read XML documents. Accessibility and transparency for the user distinguish XML from most other formats used in the construction of databases and text documents.

      The user can easily read the XML document because it is described in plain text and has a logical hierarchical tree structure. You can simplify XML documents by assigning meaningful names to elements, attributes, and objects, and by adding useful comments. (This will be discussed later in this chapter.)

      "7. XML development should be completed fairly quickly."

      XML will only become a widely accepted standard if programmers and users accept it. This standard must be created before society accepts the alternative standards that are increasingly being created by software companies.

      "8. XML should be formal and concise."

      The XML specification is written in a formal language used to represent computer languages, with a notation known as Extended Backus-Naur Form (EBNF). This formal language, although quite difficult to understand, is devoid of ambiguity and greatly facilitates the writing of XML documents, and especially programs for processing them.

      "9. XML documents will be easier to create."

      The practical use of XML as a markup language for Web documents simplifies not only the writing of processing programs, but also the process of creating the XML documents themselves.

      "10. The compressed form is not important in XML markup."

      In accordance with point 6 (the XML document must be clear and understandable to the user), the XML markup should not be overly compressed so as not to conflict with the specified purpose.

      Standard XML Applications

      You can use XML for more than just describing a single document. An individual, company, or standards committee can define the required set of XML elements and document structure to be used for a particular class of documents. Such a set of elements and a description of the document structure is called an XML application or an XML dictionary.

      For example, an organization might define an XML application to create documents describing molecular structures, human resources, multimedia presentations, or containing vector graphics. At the end of the chapter is a list of some common XML applications that have already been created and applications that are planned to be created.

      An XML application is typically defined by the creation of a document type descriptor (DTD), which is a valid component of the XML document. A DTD is built on a database schema: it establishes and defines the names of elements that can be used in a document, the order in which elements can appear, the attributes of elements that can be used, and other features of the document. To actually use an XML application, you typically include its DTD in your XML document; Having a DTD in a document limits the elements and structures you will use to ensure that your document meets the standards of that application. The XML document definitions discussed earlier in this chapter did not include DTDs. You'll learn how to define and use DTDs in Chapter 5.

      The benefits of using standard XML applications when developing your documents are that you can share the documents with all other users of the application, and the document can be processed and displayed using software that has already been built for the application.

      XML applications that improve the quality of XML documents

      In addition to XML applications for describing specific document classes, there are several XML applications that you can use within any type of XML document. These applications make document creation easier and improve its quality. Below are examples of such applications.

      • Extensible Stylesheet Language (XSL) allows you to create powerful stylesheets using XML syntax.
      • XML Schema allows you to develop detailed schemas for your XML documents using standard XML syntax, a more powerful alternative to using DTDs.
      • XML Linking Language (XLink) gives you the ability to link your XML documents. It supports multiple destination links and other useful features, providing greater freedom than HTML's linking mechanism.
      • XML Pointer Language (XPointer) allows you to define flexible target links. When XPointer and XLink are used together, you can link to anywhere in the target document - not just jumps to specific points.

      XLS will be covered in Chapter 10. Other XML applications are not yet mature and are not covered in this book. (XLink and XPointer are not supported in Internet Explorer 5).

      As you can see, XML is not only a useful tool for describing documents, but it also serves as the basis for building applications and extensions that may be in demand as the Internet evolves.

      Real Use of XML

      Although the concept of XML is quite interesting, you may be wondering how to put it into practice. This section provides a list of examples of such applications of XML, both already widely used and those in the future. If there are corresponding XML applications for practical use, they will be given in parentheses. For example, you will find that the MathML XML application will allow you to format mathematical formulas.

      Link. A more complete list of current and upcoming XML applications, including detailed descriptions, can be found on the Oasis SGML/XML Web page (http://www.oasis-open.arg/cover/ocml. htmW applications).

      • Working with databases. Like traditional databases, XML can be used to assign a label to each field of information within each database record. (For example, you can tag each name, address, and phone number within your address list entries.) You can then display the data in various ways and organize search, sorting, filtering and other processing of data.
      • Structuring documents. The hierarchical structure of XML documents is ideal for marking up the structure of documents such as novels, scientific papers, and plays. For example, you can use XML to mark up a play into acts, scenes, characters, plot lines, scenery, etc. XML markup allows programs to display or print the document in the required format; find, extract, or manipulate information in a document; generate tables of contents, summaries and annotations; process information in other ways.
      • Working with vector graphics(VML - Vector Markup Language).
      • Multimedia presentations (SMIL - Synchronized Multimedia Integration Language, HTML + TIME - HTML Timed Interactive Multimedia Extensions).
      • Description of channels. Channels are Web pages that are automatically sent to subscribers. (CDF - Channel Definition Format).
      • Description of software packages and their relationships. Such descriptions ensure the distribution and updating of software products on the network (OSD - Open Software Description).
      • Application communication over the Web using XML-co-communications. These messages are independent of operating systems, object models and computer languages ​​(SOAP - Simple Object Access protocol).
      • Sending electronic business cards via e-mail.
      • Exchange of financial information. Information is exchanged in an open and understandable format between financial programs (such as Quicken and Microsoft Money) and financial institutions (banks, public funds) (OFX - Open Financial Exchange).
      • Creation, management and use of complex digital forms for commercial Internet transactions. Such forms may include digitized signatures that make them legally recognized (XFDL - Extensible Forms Description Language).
      • Exchange of job requests and resumes (HRMML - Human Resource Management Markup Language).
      • Formatting mathematical formulas and scientific information in
      • Web (MathML - Mathematical Markup Language).
      • Description of molecular structures (CML - Chemical Markup Language).
      • Encoding and displaying information about DNA, RNA and chains (BSML - Bioinformatic Sequence Markup Language).
      • Coding of genealogical data (GeDML - Genealogical Data Markup Language).
      • Astronomical data exchange (AML - Astronomical Markup Language).
      • Creation of musical scores (MusicML -Music Markup Language).
      • Working with voice scripts to deliver information over the phone. Voice scripts can be used, for example, to generate voice messages, product availability certificates and weather forecasts (VoxML).
      • Processing and delivery of information by courier services. Federal Express, for example, already uses XML for this purpose.
      • Presentation of advertising in the press in digital format (AdMarkup).
      • Filling out legal documents and electronic exchange of legal information (XCL - XML ​​Court Interface).
      • Coding of weather forecasts (OMF - Weather Observation Markup Format).
      • Exchange of information on real estate transactions (RETS - Real Estate Transaction Standard).
      • Exchange of insurance information.
      • Exchange news and information using open Web standards (XMLNews).
      • Presentation of religious information and markup of liturgical texts (ThML - Theological Markup Language, LitML - Liturgical Markup Language).

      When using HTML, the data displayed is not logically related to the tags that are used for markup, so parsing programs cannot use the tags to find the desired fragments of the document. In addition, the limited set of HTML tags makes it difficult to use for displaying specialized information (for example, mathematical formulas).

      To replace HTML, the hypertext markup language XML (Extensible Markup Language) was proposed. This language can be used to describe the grammar of other languages ​​and to control the correctness of documents. XML defines how markup tags are created and makes them easy to extend. This makes it possible to define your own tags to identify the data contained in the document. When creating a document structure, connections between elements and the markup necessary to perform the operations of viewing, searching, and analyzing a document are built. XML can be used as a general-purpose query language for information stores. Thus, XML documents can act as a unique way of storing data, including means for parsing information and presenting it.

      The XML language has attracted a lot of attention from developers and Internet users. New languages ​​created on the basis of XML are appearing, and Web servers are appearing that use this technology to organize the information stored on them. Full specifications of XML and related languages ​​are available on the official page W3C - www.w3.org

      The birth year of XML can be considered 1998, when the language specification was approved. It all started with the appearance of the SGML language in 1986. Although the concept of hypertext was introduced by W. Bush back in 1945 and, starting from the 60s, applications using hypertext data began to appear, a surge of activity around this technology began when there was a real need for a mechanism for combining multiple information resources, providing the ability to creating, viewing text. Using SGML, you can describe structured data, organize information contained in documents, and present this information in some standardized format. The SGML language is intended for creating other markup languages; it defines a valid set of tags, their attributes and the internal structure of the document. Control over the correct use of descriptors is carried out using a special set of rules called DTD descriptions, which are used by the client program when parsing the document. For each class of documents, its own set of rules is defined that describe the grammar of the corresponding markup language. But due to its complexity, SGML has been used mainly to describe the syntax of other languages, the most famous of which is HTML.

      HTML is a simplified version of the SGML markup language. Much simpler and more convenient than SGML, the HTML language allows you to determine the design of document elements and has a certain limited set of instructions - tags, with the help of which the markup process is carried out. HTML instructions are primarily intended to control the process of displaying the contents of a document on the screen of a client program and thereby determine the way the document is presented, but not its structure. As an element of a hypertext database described by HTML, it is used text file, which can be easily transmitted over the network using the HTTP protocol. This feature, as well as the fact that HTML is an open standard and a huge number of users have the opportunity to use the capabilities of this language to design their documents, certainly influenced the growth of the popularity of HTML and made it today the main mechanism for presenting information on the Web

      The use of hypertext breakdown of a text document in modern information systems is largely due to the fact that hypertext allows you to create a mechanism for nonlinear viewing of information. In such systems, data is presented not as a continuous stream of textual information, but as a set of interconnected components, which are navigated using hyperlinks.

      The most popular hypertext markup language today, HTML, was created specifically for organizing information distributed on the Internet, and is one of the key components of WWW technology. With the use of the hypertext document model, the way of presenting various information resources on the network has become more orderly, and users have received a convenient mechanism for searching and viewing the necessary information.

      However, modern applications require not only a language for presenting data on the client screen, but also a mechanism that allows you to determine the structure of the document and describe the elements it contains. HTML has a simple set of commands and successfully copes with the task of describing hypertext information displayed on the screen by a browser. However, the displayed data itself is not associated with the tags that are used for formatting, so parsing programs do not have the ability to use HTML tags to find the document fragments we need. Those. having encountered, for example, such a description

      rose,

      the viewer will know what color to display the text contained within the tags and, but it is absolutely indifferent to where in the document this tag was found, what other tags the current fragment is enclosed in, whether fragments nested in it exist, whether the relationships between objects are built correctly. This “indifference” to the structure of a document leads to the fact that searching or analyzing information inside it will be no different from working with a continuous text file that is not broken into elements. And this, as you know, is not the most effective way to work with information.

      Another significant disadvantage of HTML is the limited set of its tags. DTD rules for HTML define a fixed set of descriptors and therefore the developer does not have the opportunity to enter his own, special tags.

      To summarize all that has been said, it can be argued that HTML does not fully satisfy the requirements that developers place on languages ​​of this kind. HTML complements the hypertext markup language XML, a powerful, flexible, and user-friendly language. What are its advantages?

      What is XML?

      The term XML refers to a special type of hypertext document. What's wrong with regular text documents and what's special about XML documents?

      In any text document you can write anything and any way you want, for example, you can put one space between some words, and two spaces between others. You can highlight a paragraph with a red line of three spaces, and sometimes leave a blank line between adjacent paragraphs. You can write the title of the document in the first line, or you can start writing the document with the author’s last name. But if the document needs to be published, then it will have to be redone - paragraphs should be formatted in a uniform way, the title should be highlighted from the general narrative as a blank line, the author’s surname and a brief summary should be indicated between the title and the first paragraph, etc. In a word, there will be a need to prepare the document in some standard way for this publication. And if you need to publish this document in another place, you will need to change and redo something again. It turns out there is a way out - to help will come XML!

      In fact, XML is a way of marking up documents, designed to form some kind of structure in documents and define the relationships between the various elements of this structure. To create such markup, special instructions called tags are used. Tags are placed between characters< и >. Thanks to the presence of tags, unified automatic processing and formatting of XML documents becomes possible. Thanks to XML, it is also possible to control the correctness of data stored in documents, as well as establish a uniform standard for the structure of documents that may contain arbitrary data. XML is indispensable when building complex information systems, in which the issue of information exchange between different consumers is very important. Thanks to XML, you can get rid of many problems associated with incompatibility between different components.

      Example of a typical XML document

      PRIME-TASS

      </p><p>The first production aircraft "Tu-214" produced by KAPO</p><p>made the first test flight</p><p>Tu-214 aircraft, produced in serial version</p><p>at the Kazan Aviation Production Association</p><p>/KAPO/, made the first test flight. About</p><p>this was reported to PRIME-TASS by the Financial Leasing Company</p><p>company /FLK/.</p><p>The plane was manufactured for the Khabarovsk airline</p><p>Dalavia under an agreement concluded in 2000</p><p>year between Dalavia and FLC, providing for the transfer to</p><p>leasing of two Tu-214s produced at KAPO. Tu-214</p><p>designed to carry 164 passengers over a distance</p><p>7.2 thousand km on routes Moscow-Khabarovsk, as well as to Korea</p><p>The total costs for preparing the production of the aircraft amounted to</p><p>RUB 1.2 billion The country's budget allocated for these purposes</p><p>only 1.5 million rubles. Preparations for production were carried out at the expense of</p><p>funds from KAPO and the budget of Tatarstan, as well as the full</p><p>exemption of the enterprise from republican and local</p><p>taxes. From the republican budget for certification</p><p>97 million rubles were allocated for the aircraft, as well as 275 million rubles</p><p>to launch the leasing mechanism.</p><p>The preliminary cost of the Tu-214 is 22-25 million dollars.</p><p></InfoItem></p><p></InfoPacket></p> </td> </tr></table><p>The first two lines in this example must be present. The first line means that <a href="https://periscopes.ru/en/gde-naiti-zagruzki-v-aifone-5-kak-udalit-dokumenty-i-dannye-s-iphone-i-ipad.html">this document</a> is an XML document, and the second one points to a special resource <u>http://xml.prime-tass.ru/dtd/UIF.dtd</u>, which contains the rules for formatting this XML document). More detailed information on these “magic words” and more can be obtained on the website <u>http://www.w3.org</u>.</p><p>The remaining lines have a clearly expressed hierarchical structure, in which there is one root tag <b><InfoPacket> </b>, and the remaining tags are nested within it. All these tags come in pairs, for example, <b><InfoPacket> </b> And <b></InfoPacket> </b>, or <b><Text> </b> And <b></Text> </b>. The first ones indicate an opening tag, the second ones indicate a paired closing tag. In an XML document, each opening tag must have a matching closing tag.</p><p>Tag <b><InfoPacket> </b> is the most important tag - the root of the hierarchical structure and is intended to store other tags nested within it. Thus, it represents a kind of “envelope” or “wrapper” - an information package. It contains tags <b><Source> </b>, <b><Time> </b> And <b><InfoItem> </b>. Tag <b><Source> </b> contains information about the source of information contained in this information package (“sender’s address”). In the tag <b><Time> </b> the time of creation of the information package is indicated (“time of sealing the envelope”). And finally in the tag <b><InfoItem> </b> there is the “letter” itself - the actual semantic content of the information package. What does this “letter” contain? It contains tags <b><Time> </b>, <b><Title> </b> And <b><Text> </b>. In the tag <b><Time> </b>, nested in a tag <b><InfoItem> </b> indicated when our “letter” was written, i.e. content writing time <b><InfoItem> </b>. This time should not be confused with the moment of “sealing the envelope” (creating an information package <b><InfoPacket> </b>). Usually they first write a “letter” and then “seal the envelope” with it. By the way, if there are several recipients, you will have to “seal” several “envelopes” with identical copies of the “letter”. Or there may be a situation when you need to put several “letters” in one envelope for one recipient. In this case, you will have to place it inside the tag <b><InfoPacket> </b> several tags <b><InfoItem> </b>. Except the tag <b><Time> </b> V <b><InfoItem> </b> tag included <b><Title> </b>, in which the title of the document or “letter” is written, if we continue our analogy. And finally there is a tag <b><Text> </b>, which appears several times within a tag <b><InfoItem> </b>. This tag <b><Text> </b> simply stands for paragraphs in a document.</p><p>All that remains is to say what the records mean and what they are needed for, such as <b>type="datetime"</b> or <b>type="string"</b> inside tag names <b><Source> </b>, <b><Time> </b> And <b><Title> </b> and why are they not in the tags? <b><Text> </b>. These kinds of entries in XML are called tag attributes. In this case we have one attribute <b>type</b>, which takes the values <b>"datetime"</b> And <b>"string"</b>. Attribute values ​​in XML are always enclosed in quotation marks. Attribute <b>type</b> is needed in order to indicate exactly how to interpret the sequence of characters contained within a tag with this attribute. Meaning <b>"datetime"</b> means that the tag value should be interpreted as a date and time, and the value <b>"string"</b>- like a regular line. At the tag <b><Text> </b> attribute <b>type</b> is missing, because It is clear from the meaning of this tag that this tag contains a text string.</p><p>XML is a markup language that describes an entire class of data objects called XML documents. This language is used as a means to describe the grammar of other languages ​​and control the correctness of documents. Those. XML itself does not contain any markup tags, it simply defines the order in which they are created. Thus, if, for example, we consider that to denote an element <i>rose</i> the document must use a tag <i><flower> </i>;, then XML allows us to freely use the tag we define, and we can include fragments like the following in the document:</p><p><flower>rose</flower></p><p>The set of tags can be easily expanded. If, suppose, we also want to indicate that the description of the flower should meaningfully go inside the description of the greenhouse in which it blooms, then we simply set new tags and choose the order in which they appear:</p><p><conservatory></p><p><flower>rose</flower></p><p></conservatory></p><p>If we want to plant a few more flowers there, we must make the following changes:</p><p><conservatory></p><p><flower>rose</flower></p><p><flower>tulip</flower></p><p><flower>cactus</flower></p><p></conservatory></p><p>As you can see, the process of creating an XML document is very simple and requires us only to have basic knowledge of HTML and an understanding of the tasks that we want to perform using XML as a markup language. This gives developers the unique ability to define custom commands that allow them to most effectively define the data contained in a document. The author of the document creates its structure, builds the necessary connections between elements, using those commands that satisfy his requirements and achieves the type of markup that he needs to perform the operations of viewing, searching, and analyzing the document.</p><p>Another obvious advantage of XML is the ability to use it as a universal query language for information repositories. Today, in the depths of the W3C, a working version of the XML-QL (or XQL) standard is being considered, which may in the future become a serious competitor to SQL. In addition, XML documents can act as a unique way of storing data that includes both the means for parsing information and presenting it on the client side. In this area, one of the promising areas is the integration of Java and XML technologies, which makes it possible to use the power of both technologies when building machine-independent applications that also use a universal data format for information exchange.</p><p>XML also allows you to control the correctness of data stored in documents, check hierarchical relationships within a document, and establish a unified standard for the structure of documents, the content of which can be a variety of data. This means that it can be used when building complex information systems, in which the issue of information exchange between different applications running in the same system is very important. By creating a structure for an information exchange mechanism at the very beginning of work on a project, a manager can save himself in the future from many problems associated with the incompatibility of data formats used by various components of the system.</p><p>Also, one of the advantages of XML is that XML document processing programs are not complicated, and all sorts of software products designed to work with XML documents have already appeared and are freely distributed. XML is supported today in Microsoft Internet Explorer 4/0 and beta versions of IE5. It was announced that it would be supported in subsequent versions of Netscape Communicator, Oracle DBMS, DB-2, and MS-Office applications. All this gives reason to assume that, most likely, in the near future, XML will become the main information exchange language for information systems, thereby replacing HTML. Well-known specialized markup languages ​​such as SMIL, CDF, MathML, XSL have already been created on the basis of XML, and the list of working drafts of new languages ​​under consideration by the W3C is constantly growing.</p> <p>In this article we will touch on the topic <b>XML document structures</b>. You and I have already talked about this, and today we will write our first <b>XML document</b>, and I will also explain its structure in detail.</p> <p>Let me give you a simple one right away <b>example XML document</b>:</p><p> <?xml version="1.0" encoding="UTF-8"?><br> <!DOCTYPE shop [<br> <!ENTITY n "Ноутбук"><br> <!ENTITY g "Игра"><br> ]><br> <shop id="1"><br> <notebooks><br> <prod>IBM Lenovo V570</prod><br> <prod>DELL Inspiron N5010</prod><br> </notebooks><br> <games><br> <prod>Gothic 2</prod><br> <prod>Might & Magic 6</prod><br> </games><br> </shop> </p><p>The title comes at the very beginning <b>XML document</b>. The header in the example is universal, the only thing is that the encoding is sometimes different. I put the most common one - <b>UTF-8</b>.</p> <p>Next comes the section <b>DOCTYPE</b>, which describes various entities. We described two: " <b>n</b>"with meaning" <b>Laptop</b>" And " <b>g</b>"with meaning" <b>Game</b>". An essence is, in a sense, a constant that we can use in a body <b>XML document</b> to shorten the recording and make it easier to maintain in the future.</p> <p>After section <b>DOCTYPE</b> coming <b>XML document body</b>. Everything here is similar to the language syntax <b>HTML</b>, that is, there are tags (they are also elements), they have attributes, as well as internal tags. But unlike <b>HTML</b>, here you come up with the names of the elements yourself, also in <b>XML</b> very strict syntax, that is, there should not be any non-closing tags or missing quotes in tag attribute values.</p> <p>Pay attention to how the ones we described in the section are used <b>CDATA</b> essence. If you need to display some special character, for example, <b>& </b> or <b>< </b>, then you must use the appropriate reserved entities.</p> <p>Regarding the relationship between various elements. Eat <b>5 </b> types of connections:</p> <ul><li><b>Parent</b>. The parent for a given one is the element that is located exactly on <b>1 </b> <b>notebooks</b>"parent is" <b>shop</b>".</li> <li><b>Child element</b>. The opposite of a parent. A child element is one that is exactly on <b>1 </b> level below and located inside the given element. For example, child elements " <b>shop</b>"are" <b>notebooks</b>" And " <b>games</b>". Please note that there is always one parent, while there can be many child elements.</li> <li><b>Ancestor</b>. An ancestor is that element for a given one that is more than <b>1 </b> higher level. For example, for the element " <b>prod</b>"ancestor is" <b>shop</b>".</li> <li><b>Descendant</b>. Similar to a child element, but only the elements must be below <b>1st</b> level of nesting in a given element. For example, for " <b>shop</b>"descendant is" <b>prod</b>".</li> <li><b>Brother</b>. An element is said to be a sibling of another element if it is on the same level as the other. Of course, in addition to one level, the presence of a common parent is also required. For example, the elements " <b>notebooks</b>" And " <b>games</b>"are brothers.</li> </ul><p>That's all I would like to tell you about <b>XML document structure</b>. And to reinforce this, I recommend that you do a simple task: make it inside the element <b>prod</b> two more elements, one of which will contain the name of the product, and the other - its price. To check the correctness <b>XML document</b>, open it in your browser. If no errors occur, it means that everything is written syntactically correctly.</p> <p>The book contains tips, algorithms and <a href="https://periscopes.ru/en/metody-treninga-metod-keisov-primery-gotovyh-keisov-dlya-treningov-po.html">ready-made examples</a> programs from various areas: encryption, file and network operations, XML, ASP.NET, interaction with MS Office and Internet Explorer, etc. The syntax of the C# language, issues of debugging and profiling applications, as well as problems that arise when switching from other languages ​​are described programming in C# language. Examples of the most commonly used <a href="https://periscopes.ru/en/prakticheskoe-vvedenie-v-regulyarnye-vyrazheniya-dlya-novichkov.html">regular expressions</a>. A separate chapter is devoted to working with equipment. <br>The archive contains the book itself and a CD with the source code.</p> <h1></h1> <p>The manual is intended for programmers beginning and continuing to study Java SE, JEE and other technologies. Its first part covers the basics <a href="https://periscopes.ru/en/skachat-java-64-bit-na-russkom-yazyke-organizaciya-sistemy-bezopasnosti-java-i-obnovleniya.html">Java language</a> and object-oriented programming concepts. The second part covers aspects of using Java class libraries, including files, collections, network and multi-threaded applications, and interaction with XML. The third part provides the basics of programming distributed information systems using servlets, JSP and the developer's own tags. The fourth part provides the basics of practical application of design patterns. <br>At the end of each chapter, test questions are given on the material in the chapter and tasks to complete. <br>The appendices provide additional material related to the use of UML, SQL, Ant, XML, and <a href="https://periscopes.ru/en/pokoleniya-kompyuterov-kratkoe-opisanie-hranenie-dannyh-i-komand-v.html">brief description</a> popular technologies Log4J, JUnit, JPA and Hibernate.</p> <h1></h1> <p>Description of the book <i>Open XML is short and accessible</i>: </span><br>This book contains <a href="https://periscopes.ru/en/podrobnyi-obzor-routera-modeli-zte-mf920-rasskazyvaem-o.html">detailed review</a> three main markup languages ​​of the Open XML standard. The book is intended for readers familiar with XML or HTML. Architects and software developers building document-centric solutions will learn how to build those solutions on the Open XML platform.</p> <p>This book will be useful both for those new to markup languages ​​and for experts in the field who are not familiar with Open XML.</p> <h1></h1> <p>Description of the book <i>Advanced Applications and Structures in Xml Processing: Label Streams, Semantics Utilization and Data Query Technologies</i>: </span><br>Applications and Structures in XML Processing: Label Streams, Semantics Utilization and Data Query Technologies reflects the significant research results and latest findings of scholars’ worldwide, working to explore and expand the role of XML. This collection represents an understanding of XML processing technologies in connection with both advanced applications and the latest XML processing technologies that is of primary importance. It provides the opportunity to understand topics in detail and discover XML research at a comprehensive level.</p> <h1></h1> <p>Description of the book <i>XML: Web Application Development</i>: </span><br>The book offers a complete description <a href="https://periscopes.ru/en/vvedenie-v-xml-dtd-yazyki-opisaniya-chem-xml.html">XML language</a> in conjunction with the XSLT and XPath languages, presented in the first part. The second part of the book contains practical guidance on the application of the material presented in the first part of the book. In addition to XML, issues that arise when building real Web applications are addressed, namely, passing HTTP request parameters to the server, designing forms, presenting data using cascading style sheets, and processing user actions using JavaScript.</p> <p>Part I. XML from A to Z</p> <ul><li>XML language</li> <li>XSLT language</li> <li>XPath language</li> <li>Complex example</li> <li>Necessary additions</li> </ul><p>Part II. Practical development of web applications</p> <ul><li>Tools for creating a Web application</li> <li>Cascading Style Sheets</li> <li>Data processing methodology</li> <li>Data presentation</li> </ul> <h1></h1> <p>Description of the book <i>Python & XML</i>: </span><br>If you are a Python programmer who wants to incorporate XML into your skill set, this is the book for you. Python has attracted a wide variety of developers, who use it either as glue to connect critical programming tasks together, or as a complete cross-platform application development language. Yet, because it is object-oriented and has powerful text manipulation abilities, Python is an ideal language for manipulating XML.</p> <p>Python & XML gives you a solid foundation for using these two languages ​​together. Loaded with practical examples, this new volume highlights common application tasks, so that you can learn by doing. The book starts with the basics then quickly progresses to complex topics, like transforming XML with XSLT, querying XML with XPath, and working with XML dialects and validation. It also explores the more advanced issues: using Python with SOAP and distributed web services, and using Python to create scalable streams between distributed applications (like databases and web servers).</p> <p>The book provides effective practical applications, while referencing many of the tools involved in XML processing and Python, and highlights cross-platform issues along with tasks relevant to enterprise computing. You will find ample coverage of XML flow analysis and details on ways in which you can transport XML through your network.</p> <p>Whether you are using Python as an application language, or as an administrative or middleware scripting language, you are sure to benefit from this book. If you want to use Python to manipulate XML, this is your guide.</p> <h1></h1> <p>Description of the book <i>XML Bible</i>: </span><br>The emergence of XML is having an enormous impact on Web development, and scaling the learning curve of this new technology is a priority for many developers. The XML Bible offers a superb introduction to the subject and the groundwork to understand XML"s future developments.</p> <p>Author Elliotte Rusty Harold uses a patient, step-by-step discussion that clearly points out the potential of XML without boring his readership with tons of SGML spec-speak. Harold opens quickly with a "Hello World" example to get the reader coding early, and follows that with a simple but powerful example of XML"s data management benefits—presenting baseball statistics. Once you"ve coded your first XML documents, you" ll be hooked on the technology and motivated to learn about the more sophisticated topics.</p> <p>Style sheet languages ​​are covered comprehensively to illustrate the presentation possibilities and pitfalls. An unusually long list of real-life XML applications also shows how XML is already being used, and there is in-depth coverage of the Resource Description Framework, Channel Definition Format, and Vector Markup Language. The book wraps up with a section that helps you design your own XML application from scratch.</p> <h1></h1> <p>Description of the book <b>XSLT. Collection of recipes</b>: </span><br>The XSLT (Extensible Stylesheet Language Transformation) language has become the main tool for processing XML documents, but many developers still have not fully mastered it and therefore believe that it is easier to modify existing code than to write new code from scratch. In version 2.0, many problems have been resolved, but a number of new features have appeared that still need to be explored. In addition, it is not yet sufficiently supported.</p> <p>The second edition of this book contains hundreds of solutions to problems that programmers regularly encounter. Options are given for both versions of XSLT. The recipes range from string manipulation and math to advanced topics like extending XSLT, testing and debugging style sheets, and creating SVG graphics. Each recipe justifies the choice of solution and explains the technique used. For many problems, alternative solutions are provided with comments regarding usability and performance.</p> <p>Offering recipes for a variety of skill levels, this book is the ideal companion for the programmer who loves to learn by example. It doesn’t matter whether you are trying out XSLT for the first time or are already familiar with this language and want to have a selection of ready-made recipes for solving complex problems, in it you will find the most <a href="https://periscopes.ru/en/kak-vosstanovit-udalennye-soobshcheniya-iz-vk-vosstanavlivaem-soobshcheniya-vk-luchshie-sposoby-kak-vossta.html">different ways</a> XSLT applications.</p> <h1></h1> <p>Description of the book <b>Learning XML</b>: </span><br>This edition focuses on Extensible XML Markup Language, a promising and powerful tool that provides a flexible way to create self-documenting documents and share both format and data on the Internet. The history, current state and tasks of XML, fundamental issues are considered. For beginning developers, the basics of XML document creation techniques and the concepts of XML elements, attributes, entities, and namespaces are covered. Complex issues are addressed to professionals - transformations, document modeling, <a href="https://periscopes.ru/en/chto-takoe-dns-server-kak-uznat-predpochitaemyi-adres-provaidera-zamenit.html">fine tuning</a> templates, XML programming, using links and cascading style sheets.</p> <p>The book shows with examples how to effectively use XML by formatting and transforming XML documents so that they can be processed by browsers, databases, and so on. The material is accompanied by links to real projects. The appendices describe Internet resources, books, and standards related to XML. A glossary is included in the book.</p> <h1></h1> <p>Description of the book <b>XML. Directory</b>: </span><br>The XML Reference is a source of information for developers in the rapidly evolving world of XML. Once readers understand the core XML standard, they can quickly grasp the intricacies of DTDs, namespaces, XML document correctness, and Unicode support.</p> <p>One of the most unexpected directions in the development of XML was its active adoption for working with structured documents: electronic and <a href="https://periscopes.ru/en/matematicheskii-trenazher-tablica-umnozheniya-i-deleniya-raspechatat.html">mathematical tables</a>, statistical and financial reports and software files.</p> <p>An overview of key technologies used primarily for narrative XML documents such as web pages, books, and articles will help you gain a working knowledge of XSLT, XPath, XLink, XPointer, CSS, and XSL-FO. Surely many will be interested in using XML for intensive data processing.</p> <p>Several chapters cover the utilities and APIs needed to write XML processing programs, such as SAX, a simple API for XML, and DOM, <a href="https://periscopes.ru/en/obektno-orientirovannye-modeli-dannyh-obektno-orientirovannaya-model.html">object model</a> W3C documents.</p> <p>The book also includes material that forms the basis of any O"Reilly reference book. These chapters provide detailed syntax rules (accompanied by examples) of the main XML technologies, including DTD, XPath, XSLT, SAX and DOM. This reference describes the rules that Authors of all XML documents should adhere to this, both web designers creating animations using SMIL and C++ programmers using SOAP to serialize objects to a remote database.</p> <script>document.write("<img style='display:none;' src='//counter.yadro.ru/hit;artfast_after?t44.1;r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+ ";"+Math.random()+ "border='0' width='1' height='1' loading=lazy loading=lazy>");</script> </article> <div class="tags"></div> <script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script> <div class="yashare-auto-init" data-yashareL10n="ru" data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki,moimir,gplus" data-yashareTheme="counter" ></div> <div id="venus-269"></div> </div> <div class="seealso"> <span class="title">Read more:</span> <ul> <li> <div> <a href='https://periscopes.ru/en/mozilla-thunderbird-skachat-besplatno-russkaya-versiya-ustanovka-i-nastroika-pochtovogo.html' title='Installing and configuring the Mozilla Thunderbird email client'> <noindex><img width="640" height="426" src="/uploads/c93f8dd10a215b1bf860747e9d5f063b.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Installing and configuring the Mozilla Thunderbird email client" sizes="(max-width: 640px) 100vw, 640px" / loading=lazy loading=lazy></noindex> </a> </div> <span class='date'><noindex>2024-08-03 01:08:19</noindex></span> <div><a href='https://periscopes.ru/en/mozilla-thunderbird-skachat-besplatno-russkaya-versiya-ustanovka-i-nastroika-pochtovogo.html' title='Installing and configuring the Mozilla Thunderbird email client'>Installing and configuring the Mozilla Thunderbird email client</a></div> </li> <li> <div> <a href='https://periscopes.ru/en/vodopad-khon-samyi-shirokii-vodopad-v-mire-chto-privezti-iz-etoi.html' title='What to bring from this country'> <noindex><img width="640" height="426" src="/uploads/e35795e6fdaecbece41e56f636245cbe.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="What to bring from this country" sizes="(max-width: 640px) 100vw, 640px" / loading=lazy loading=lazy></noindex> </a> </div> <span class='date'><noindex>2024-08-01 01:08:07</noindex></span> <div><a href='https://periscopes.ru/en/vodopad-khon-samyi-shirokii-vodopad-v-mire-chto-privezti-iz-etoi.html' title='What to bring from this country'>What to bring from this country</a></div> </li> <li> <div> <a href='https://periscopes.ru/en/virtualnaya-mashina-android-dlya-windows-7-luchshie-emulyatory-androida-na-pk.html' title='The best Android emulators on PC'> <noindex><img width="640" height="426" src="/uploads/e7ab8a02c72dfcb5310df3a4d1346afc.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="The best Android emulators on PC" sizes="(max-width: 640px) 100vw, 640px" / loading=lazy loading=lazy></noindex> </a> </div> <span class='date'><noindex>2024-07-31 01:07:19</noindex></span> <div><a href='https://periscopes.ru/en/virtualnaya-mashina-android-dlya-windows-7-luchshie-emulyatory-androida-na-pk.html' title='The best Android emulators on PC'>The best Android emulators on PC</a></div> </li> <li> <div> <a href='https://periscopes.ru/en/skolko-stoit-alcatel-one-touch-pop-c5-alcatel-onetouch-pop-c5---tehnicheskie-harakteristiki.html' title='Alcatel OneTouch Pop C5 - Specifications'> <noindex><img width="640" height="426" src="/uploads/df989d289d333b7ee899595673d56cef.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Alcatel OneTouch Pop C5 - Specifications" sizes="(max-width: 640px) 100vw, 640px" / loading=lazy loading=lazy></noindex> </a> </div> <span class='date'><noindex>2024-07-31 01:07:19</noindex></span> <div><a href='https://periscopes.ru/en/skolko-stoit-alcatel-one-touch-pop-c5-alcatel-onetouch-pop-c5---tehnicheskie-harakteristiki.html' title='Alcatel OneTouch Pop C5 - Specifications'>Alcatel OneTouch Pop C5 - Specifications</a></div> </li> <li> <div> <a href='https://periscopes.ru/en/proshivka-telefona-na-primere-lg-gt540-optimus-oficialnaya-proshivka-lg.html' title='Official LG firmware cannot be installed via KDZ Lg mobile support'> <noindex><img width="640" height="426" src="/uploads/ef1b03edbe610c89a54db6ff07327b6f.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Official LG firmware cannot be installed via KDZ Lg mobile support" sizes="(max-width: 640px) 100vw, 640px" / loading=lazy loading=lazy></noindex> </a> </div> <span class='date'><noindex>2024-07-30 01:07:32</noindex></span> <div><a href='https://periscopes.ru/en/proshivka-telefona-na-primere-lg-gt540-optimus-oficialnaya-proshivka-lg.html' title='Official LG firmware cannot be installed via KDZ Lg mobile support'>Official LG firmware cannot be installed via KDZ Lg mobile support</a></div> </li> <li> <div> <a href='https://periscopes.ru/en/wi-fi-router-dlya-doma-kriterii-vybora-kakoi-wi-fi-router-luchshe.html' title='Which Wi-Fi router is better to buy for a home or apartment?'> <noindex><img width="640" height="426" src="/uploads/76bc3c0923d34ef9efac5fe8a1bb6356.jpg" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Which Wi-Fi router is better to buy for a home or apartment?" sizes="(max-width: 640px) 100vw, 640px" / loading=lazy loading=lazy></noindex> </a> </div> <span class='date'><noindex>2024-07-30 01:07:32</noindex></span> <div><a href='https://periscopes.ru/en/wi-fi-router-dlya-doma-kriterii-vybora-kakoi-wi-fi-router-luchshe.html' title='Which Wi-Fi router is better to buy for a home or apartment?'>Which Wi-Fi router is better to buy for a home or apartment?</a></div> </li> </ul> </div> </div> </div> </div> <footer> <nav id="links"> </nav> <div id="footer"> <div class="icon-logos_footer" style="position:absolute; top:16px; left:18px; width: 119px; height: 19px;"> </div> <span>© 2024. Mobile technologies and telecom operators</span> <div> </div> </footer> </div> </div> </div> <script type='text/javascript' src='https://periscopes.ru/wp-content/plugins/wp-polls/polls-js.js?ver=2.73.7'></script> <script type='text/javascript' src='/wp-includes/js/comment-reply.min.js?ver=4.8.2'></script> <script type='text/javascript'> var q2w3_sidebar_options = new Array(); q2w3_sidebar_options[0] = { "sidebar" : "sidebar-article", "margin_top" : 10, "margin_bottom" : 0, "stop_id" : "", "screen_max_width" : 0, "screen_max_height" : 0, "width_inherit" : false, "refresh_interval" : 1500, "window_load_hook" : false, "disable_mo_api" : false, "widgets" : ['text-20'] } ; </script> <script type='text/javascript' src='https://periscopes.ru/wp-content/plugins/q2w3-fixed-widget/js/q2w3-fixed-widget.min.js?ver=5.0.4'></script> <script type='text/javascript' src='/wp-includes/js/wp-embed.min.js?ver=4.8.2'></script> <script type='text/javascript' src='https://periscopes.ru/wp-content/plugins/akismet/_inc/form.js?ver=4.0'></script> <script type="text/javascript"> $(document).ready(function(){ var bg = $(".slider > ul > li > a > img").attr ("src"); $(".slider").css("background", "url("+bg+")"); $(".slider > ul > li:first-child").addClass ("active"); } ); $(function () { $("#devider").masonry({ itemSelector: ".vpost" } ); $(".sub-menu").each(function () { $(this).parent().eq(0).hover(function () { $(this).addClass("li-hover"); } , function () { $(this).removeClass("li-hover"); } ); } ); $(".tabs-all-cat > li").each(function () { $(this).hover(function () { $(this).addClass("li-hover"); $(".tabs-all-cat > li > ul").show(); } , function () { $(this).removeClass("li-hover"); $(".tabs-all-cat > li > ul").hide(); } ); } ); $(".slider-a").click(function () { $(".slider > ul > li").removeClass ("active"); $(this).parent().addClass ("active"); var bg = $(".active > a > img").attr ("src"); $(".slider").css("background", "url("+bg+")"); } ); } ); </script> </body> </html>