In the early days of Intel, Andy Grove met an employee - he
It is recommended that the company develop personal computers based on chips. Andy
Grove asked, "What can a personal computer do?"
Employees, for example, can store prescriptions. Grove takes the whole
Research, development and market costs millions of dollars, and the final decision
Think of providing chips for traffic lights as the beginning.
Everyone is hindsight. Andy Grove, no matter how you look at him, it is universal
Think of being a very smart person - able to make a big decision to grow the company. but
It was in the 1970s that it was impossible to force him to foresee the potential of personal computers. if
He had seen Excel, Quark, Photoshop, Oracle or the Internet at that time, and he would
Understand that putting a powerful processor on the desktop will allow the software to do anything.
But if you haven't seen it with your own eyes, who would have thought of it? Using typewriters, adders and lead
In the era of pen as a computing tool, can you explain the PC and its purpose?
This example can be used to interpret extended markup languages (XML - eXtensible Markup
on Language). There is no similar thing to it yet, so it is difficult to compare
Compare. You may have heard that XML is a replacement for HTML or XML is similar to HTML,
Define your own tag. Neither of these statements is true, just like saying that a PC is a storage location
The same machine as square.
My mom is a well-trained chef and if I use her recipe, my family
It will save a lot of money.
I started with a simple one. So I opened the text editor and started writing some HTML
Code:
<HTML>
<H1 ALIGN=CENTER>Recipe</H1>
<FONT FACE size=2>Chocolate Chip Bars</FONT>
After writing the above lines, I wanted to continue writing my mom’s exquisite recipe. So how
What to do? An old-fashioned web page. What's next? Give my page URL to
People who are interested in this recipe and then let them peel off the <P> and <FONT
FACE size=2>? It takes some time and I want to get the actual content.
Take a look at the following possible XML tags:
<author>Carol Schmidt</author>
<recipe_name>Chocolate Chip Bars</recipe_name>
In XML, tags can best describe content. In this way, I can
Determine any search for "Chocolate Chip" that appears in the <recipe_name> tag
Anyone can get the recipe from Mom. Further, if my message is like this
like tags (meaningful tags) enclosed - I can tell other programs such as
How to use them. I can also encode the <recipe_name> tag inside the <recipe_name> tag
Put it into a domain in the database and output it to a hard copy of a book.
Also, I can make publishing of web pages a breeze with an XML-enabled word processor.
This is the essence of XML: make tags readable to both human and machine. But implementing this
Before you target, you should understand what is involved in encoding with XML.
Documents should be well organized
An XML file must meet two points: well-organized and effective. We take a group
Get started with a good document.
I invented some tags that describe recipes and organized them into a reasonable
and readable. It may not be the best mark, but in the following example
Works very well.
<?xml version="1.0"?>
<list>
<recipe>
<author>Carol Schmidt</author>
<recipe_name>Chocolate Chip Bars</recipe_name>
<meal>Dinner
<course>Dessert</course>
</meal>
<ingredients>
<item>2/3 C butter</item>
<item>2 C brown sugar</item>
<item>1 tsp vanilla</item>
<item>1 3/4 C unsifted all-purpose flour</item>
<item>1 1/2 tsp baking powder</item>
<item>1/2 tsp salt</item>
<item>3 eggs</item>
<item>1/2 C chopped nuts</item>
<item>2 cups (12-oz pkg.) semi-sweet choc. chips</item>
</ingredients>
<directions>
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 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.
</directions>
</recipe>
</list>
This is an acceptable XML document - tell you what XML is: Put data
Organize in a practical way.
Although these tags look a bit like HTML, there are big differences:
There is no information indicating how the data is represented. Layout instructions, when we are ready,
It will appear from other places. This is to put the address book information in the database field
The same is true for recording rather than putting it in a list generated by a word processor. data
The library allows you to synthesize information from the address book into tags, envelopes, letters or other
any desired carrier on top. Finally, we can synthesize this recipe file into one
Expression language, such as HTML or CSS.
As mentioned earlier, XML documents must be well organized. This means that the file must meet the following
Three basic rules:
The document starts with an XML definition <?xml version="1.0"?>.
There is a root element that contains all the other contents, like the <list> in the above example
and </list> tags.
All elements must be reasonably nested and cross-necking is not allowed.
In the example above, several <item> elements are reasonably nested with <ingredients> and
</ingredients> tag. But the following marks have serious problems:
<ingredients><item></ingredients>chocolate chips</item>
So "chocolate chips" is not included in the ingredients list. therefore
This document is not organized well. This may not be anything in HTML, because the browser
Has been designed to handle this problem.
But it's deadly in XML - the application will refuse to handle unorganized
document.
We now know that it is very important to be well organized, but it's more than that