One of the XML simple tutorials

xiaoxiao2021-03-06  48

In the earlier of Intel, Andy Grove encountered an employee - he recommended that the company developed a personal computer on the basis of the chip. Andygrove is questionable "What can I do?" For example, this employee said it can store the prescription. Grove takes into account millions of rice rounds throughout the study, development and market costs, and finally decided to provide chips to the red green light. Everyone is afterwards. Andy Grove, no matter how you look at him, it is generally believed to be a very smart person - a major decision that can make a development company. However, in the 1970s, it is impossible to force him to foresee the potential of the personal computer. If he has seen Excel, Quark, Photoshop, Oracle or the network, he will understand that powerful processors will allow software to do anything on the desktop.

But if you haven't seen you, who can think of it. Can you explain the PC and its use with typewriters, adders and pencils as the calculated tools, can you explain the PC and its use?

This example can be used in the Interpretation Extension Markup Language (XML - Extensible MarkUplanguage). It's hard to make comparisons now. You may have heard that the XML is an alternative or XML of HTML or XML is similar to HTML, which can define your own marker. These two statements are not all right, just like the PC is a machine that stores prescriptions.

My mother is a well-trained chef. If I use her formula, my family will save a lot of money.

I started with a simple start. So I open the text editor and start writing some HTML code:

Recipe

Chocolate Chip Bars

After writing the above line, I would like to write my mother's exquisite recipe. So how do you do it? A vintage web page. what's next? Get my URL of my page to people who are interested in this recipe, then let them peeze the

and ? I have to spend some time, I want to get the actual content.

Take a look at the possible XML tags below:

Carol Schmidt

Chocolate Chip Bars

In XML, the marker can be best described. In this way, I can affirm that anyone who finds "Chocolate Chip" in the tag can get the recipe of Mom_Name. Further, if my information is surrounded by such a marker (meaningful tag) - I can tell other programs how to use them. I can also put the contents of the tag into a domain in the database, then output it to a hard copy of a book. Also, I can use a word processor that supports XML to make the web page publishing.

This is the essence of XML: makes the mark to people and machines. But before implementing this goal, it should be understood that the things involved in XML encoding are understood.

Document To organize a good XML file must meet two points: organize well and effective. We start with a good document in an organization.

I invented some markers that describe the recipes and organized them into a reasonable and readable way. It may not be the best tag, but it works well in the example below.

carol schmidt chocolate chip bars dinner Dessert 2/3 c butter 2 c brown sugar 1 TSP vanilla 1 3/4 c unsifted all-purpose flour 1 1/2 TSP BAKING POWDER 1/2 TSP Salt 3 Eggs 1/2 c chopped nuts 2 Cups (12-Oz PKG.) Semi-Sweet ChoC. Chips Preheat Oven to 350 DegRees. Melt Butter; Combine with brown sugar and vanilla in large mixing bowl .Set aside to cool Combine flour, baking powder, and salt;. set aside.Add eggs to cooled sugar mixture;. beat well Stir in reserved dryingredients, nuts, and chips.Spread in greased 13-by-9-inch pan. Bake for 25 TO 30 Minutes Until GoldenBrown; Cool. Cut Into Squares. This is an acceptable XML document - telling you what XML is: use the data to be actually Significantly organizes. Although these markers appear to be a bit like html, there is a big difference: the information does not indicate how the data is expressed. Layout instructions, when we are ready, will appear from it elsewhere. This and put the information of the address book in the field and record of the database rather than placed in the list of words generated by the word processor. The database allows you to synthesize information in the address book to the label, envelope, letters, or any otherwise anyworthy carrier. Finally, the recipe file is synthesized into a performance language, such as HTML or CSS.

As mentioned earlier, the XML document must be well organized. This means that the file must meet the following three basic rules:

Documentation is defined in XML and tag characters in the above example. All elements must be reasonably nested, and cross-nested are not allowed. In the above example, several elements are reasonably nested in the and tag characters. But the following tags have a serious problem:

Chocolate Chips The "Chocolate Chips" is not included in the Ingredients list. So this document is not organized. This may not be countless in HTML, because the browser has been designed to handle this problem.

But in XML is fatal - the application will refuse to handle files without organizational.

We now know that the organization is very important, but it is not there.

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

New Post(0)