成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

XML進(jìn)階:Level 1 - XML簡介

EddieChan / 3010人閱讀

摘要:請注意,正斜杠位于結(jié)束標(biāo)記中的標(biāo)記描述之前。正斜杠必須在所有結(jié)束標(biāo)簽之前,但標(biāo)簽的語言必須與開頭標(biāo)簽相同,上面的示例是。無論元素是否包含值,只要使用兩個(gè)標(biāo)簽,開始和關(guān)閉標(biāo)簽必須完全匹配,精確到大小寫除了結(jié)束標(biāo)簽中的正斜杠。

By Rob Sheldon, 2014/03/26 (首次發(fā)表于: 2012/09/20)

關(guān)于系列

本文屬于進(jìn)階系列:XML進(jìn)階

自2003年以來,XML一直是SQL標(biāo)準(zhǔn)的一部分,許多動態(tài)管理視圖也返回XML數(shù)據(jù),所以,對于每一個(gè)數(shù)據(jù)庫管理員而言,同樣是至關(guān)重要的。現(xiàn)在,這個(gè)行業(yè)更多地用于由文檔標(biāo)記定義的數(shù)據(jù),數(shù)據(jù)庫開發(fā)人員和數(shù)據(jù)庫管理員比以往任何時(shí)候都更了解XML技術(shù)和使用它的方式。 在這一系列文章中,羅伯特·謝爾頓(Robert Sheldon)將盡力把復(fù)雜的東西簡單化。 注意:這一系列的文章已經(jīng)可作為電子書獲取。

可擴(kuò)展標(biāo)記語言(XML)首先在SQL Server的SQL Server 2000發(fā)行版中提供支持。然而,與XML相關(guān)的功能僅限于專注于映射關(guān)系數(shù)據(jù)和XML數(shù)據(jù)的數(shù)據(jù)管理功能。例如,SQL Server 2000中添加了FOR XML子句,可以將關(guān)系查詢結(jié)果作為XML返回。

但是到添加了XML數(shù)據(jù)類型的SQL Server 2005發(fā)布時(shí),支持XML就變得有意義起來。 XML數(shù)據(jù)類型允許將XML文檔本身存儲在使用該類型配置的列和變量中。數(shù)據(jù)類型還支持一組可用于檢索和修改XML文檔中特定組件的方法。

為了充分利用SQL Server支持的與XML相關(guān)的功能,你可能會發(fā)現(xiàn)對XML本身有一個(gè)基本的了解是很有用的。為此,XML進(jìn)階系列的第一部分將介紹XML是什么,并對構(gòu)成XML文檔的各種組件進(jìn)行介紹。

XML概述

和超文本標(biāo)記語言(HTML)相似,XML也是一種標(biāo)記語言,它使用標(biāo)簽來描述和這些標(biāo)簽相關(guān)聯(lián)的數(shù)據(jù)的性質(zhì)。使XML可擴(kuò)展的是它的自描述性質(zhì),也就是創(chuàng)建特定于XML文檔中包含的數(shù)據(jù)值的標(biāo)簽。在HTML中,這些標(biāo)簽是預(yù)定義的。 (通過XML組件,XML的可擴(kuò)展性將變得更加清晰。)

盡管XML具有可擴(kuò)展性,但它仍然是一種標(biāo)準(zhǔn)化語言,必須符合由萬維網(wǎng)聯(lián)盟(W3C)定義的特定格式規(guī)則集。由于這種標(biāo)準(zhǔn)化與用于顯示數(shù)據(jù)的HTML不同,這種語言被廣泛地用于傳輸和存儲數(shù)據(jù)。

XML可以輕松地在異構(gòu)系統(tǒng)之間共享數(shù)據(jù),而不管硬件,操作系統(tǒng)或應(yīng)用程序類型如何,XML的普遍應(yīng)用意味著數(shù)據(jù)可以更少的進(jìn)行人為干預(yù)處理。同時(shí)可以控制數(shù)據(jù)的描述、排列和顯示方式。

XML 組件

構(gòu)成XML文檔的主要組件和支配這些組件使用的規(guī)則通常非常簡單,但為了使XML文檔能夠被SQL Server XML解析器正確處理,你必須嚴(yán)格遵守一些規(guī)則。

XML文檔中主要包含兩種類型的信息:要存儲的數(shù)據(jù)和描述數(shù)據(jù)的標(biāo)簽。 標(biāo)簽由一組尖括號(<>)組成,它們包含描述與標(biāo)簽相關(guān)聯(lián)的數(shù)據(jù)的描述性詞或復(fù)合詞(無空格)。 正是由于這些標(biāo)簽的自描述性質(zhì),XML通常被認(rèn)為是元語言。

每個(gè)離散的存儲數(shù)據(jù)片段都被封裝在開始標(biāo)簽和結(jié)束標(biāo)簽中,如下例所示:

John Doe

在這種情況下,開始標(biāo)簽是,結(jié)束標(biāo)簽是。 請注意,正斜杠位于結(jié)束標(biāo)記中的標(biāo)記描述之前。 正斜杠必須在所有結(jié)束標(biāo)簽之前,但標(biāo)簽的語言必須與開頭標(biāo)簽相同,上面的示例是Person。 我可以選擇一個(gè)除Person之外的名稱,包括與人無關(guān)的名稱,但是一個(gè)好的做法是始終提供最能描述打開和關(guān)閉標(biāo)簽中包含的數(shù)據(jù)的標(biāo)簽名稱。 在這種情況下,標(biāo)簽描述了一個(gè)人的名字John Doe,因此標(biāo)簽名稱為。

同樣的,標(biāo)簽和封閉的數(shù)據(jù)代表一個(gè)單一的元素。 但是,元素并不總是包含數(shù)據(jù)。 一個(gè)空的元素可以以兩種方式之一呈現(xiàn)。 第一個(gè)是通過指定打開和關(guān)閉標(biāo)簽,但不包括數(shù)據(jù),如下例所示:

 

表示一個(gè)空白元素的另一種方法是只使用一組括號,但仍包括正斜杠:


再者,只有當(dāng)元素不包含值時(shí),才能使用這個(gè)方法。 以后你在XML進(jìn)階系列中可能看到模式需要一個(gè)沒有值的元素。 在這種情況下,可以使用縮寫格式來表示元素的兩個(gè)標(biāo)簽。

無論元素是否包含值,只要使用兩個(gè)標(biāo)簽,開始和關(guān)閉標(biāo)簽必須完全匹配,精確到大小寫(除了結(jié)束標(biāo)簽中的正斜杠)。 例如,以下元素在SQL Server XML解析器中生成錯(cuò)誤,因?yàn)閮蓚€(gè)標(biāo)簽不能匹配:

 John Doe 

開始標(biāo)簽中的描述性文字都是小寫的; 然而,結(jié)束標(biāo)簽中的描述性詞應(yīng)以大寫字母開頭。 開始和結(jié)束標(biāo)簽必須匹配,以被認(rèn)為是適當(dāng)?shù)幕蛘吒袷搅己玫腦ML。

但是你可以將元素嵌入到彼此中。 在以下示例中,我將元素的兩個(gè)實(shí)例嵌入到元素中:


John Doe
Jane Doe

請注意,每個(gè)元素本身都是完整的。 它包括打開和關(guān)閉標(biāo)簽及其附帶的數(shù)據(jù)。 嵌入其他元素中的元素稱為子元素( child),或在某些情況下稱為subelements。 外部元素(在這種情況下為)是父元素。 XML文檔最高級別的父元素被認(rèn)為是根元素。 所有XML文檔必須有且只有一個(gè)根元素。 因此,上面示例中的元素是兩個(gè)元素的父元素,它是XML文檔的根元素。

SQL Server還允許將XML片段存儲在XML列或變量中。 片段是沒有根元素的XML代碼塊,例如以下示例中顯示的兩個(gè)元素:

John Doe
Seattle, WA

元素必須仍然是格式良好的XML,也就是具有包含數(shù)據(jù)的匹配標(biāo)簽,但它們不一定是XML文檔。 像以后你將在XML進(jìn)階系列中看到的那樣,你可以指定只允許在XML列或變量中使用XML文檔,但現(xiàn)在只要知道SQL Server可以區(qū)分和存儲XML文檔和片段即可。

在其他元素中嵌入元素時(shí),必須確保子元素在完成父元素之前已經(jīng)完成。 例如,在以下示例中,我在元素之前結(jié)束了元素,這會導(dǎo)致SQL Server XML解析器生成錯(cuò)誤:

John Doe

你必須確保無論多少級別包含嵌入元素,你的子元素都是完整的。 在下面的示例中,元素嵌入在每個(gè)元素中,元素嵌入在元素中:



John
Doe


Jane
Doe


在這種情況下,元素充當(dāng)子元素和父元素。 但是請注意,每個(gè)嵌入的元素,無論級別如何,必須落在父元素的開始和結(jié)束標(biāo)記之內(nèi)。 例如,元素的第一個(gè)實(shí)例完全落在元素的第一個(gè)實(shí)例中,并且元素的兩個(gè)實(shí)例完全落在元素中,即 文檔的根元素。

元素也可以具有與它們相關(guān)聯(lián)的屬性。 屬性是可以賦值的屬性。 該屬性被定義為元素的開始標(biāo)簽的一部分。 在以下示例中,我已經(jīng)將id屬性添加到元素的每個(gè)實(shí)例中:



John
Doe


Jane
Doe


如示例所示,屬性由屬性名稱(在這種情況下為id),后跟等號,屬性值由雙引號括起來。因此,元素的第一個(gè)實(shí)例的id屬性的值為1234,而元素的第二個(gè)實(shí)例的id屬性的值為5678。

許多XML文檔中包含的另一個(gè)組件是聲明,它至少指定了文檔符合的XML標(biāo)準(zhǔn)的版本。到目前為止,只有兩個(gè)版本:1.0和1.1。如果使用XML 1.0,聲明是不必要的;但是XML 1.1需要聲明。因此,你應(yīng)該知道如何在XML文檔中包含聲明。

如果你包含聲明,則必須將其放在文檔的開頭,用<?打開標(biāo)簽,并使用?>關(guān)閉標(biāo)簽結(jié)束。另外,你必須包含xml關(guān)鍵字(小寫)和版本屬性(也是小寫)。通常包括的另一個(gè)屬性(盡管是可選的)是編碼,它指定用于XML文檔的字符編碼。在下面的示例中,我包括一個(gè)聲明,它指定版本1.0和UTF-8的編碼,這意味著數(shù)據(jù)被存儲為8位Unicode字符序列:




John
Doe


Jane
Doe


您還可以向XML文檔添加注釋。 要做到這一點(diǎn),只需在<! - 標(biāo)簽之前注釋,并將其結(jié)束于 - >標(biāo)簽,就像我在下面的例子中所做的那樣:





John
Doe


Jane
Doe


正如你所看到的那樣,我已經(jīng)添加了評論當(dāng)前客戶端的列表,附加在注釋標(biāo)簽中。 SQL Server XML解析器將忽略標(biāo)簽內(nèi)的任何內(nèi)容,因此你不僅可以使用注釋功能提供有關(guān)XML文檔及其數(shù)據(jù)的信息,還可以掛起保留不想作為文檔進(jìn)行處理的XML代碼部分。

另一個(gè)使用XML時(shí)要考慮的是,當(dāng)元素值出現(xiàn)時(shí),某些字符將無法解析。 例如,您不能在元素的值中包含&符(&),就像我在以下示例中的子元素中所做的那樣:





John
Doe


Jane
Doe
Crime & Punishment


如果我嘗試將此XML文檔分配給XML列或變量,則子元素將導(dǎo)致解析器生成錯(cuò)誤,因?yàn)椤癈rime & Punishment”值包含&符號。 你必須使用實(shí)體引用替換此類型的字符,該實(shí)體引用會告知解析器保留原始打算的字符。 實(shí)體引用以&符號開頭,以分號結(jié)尾,其間包含代表原始值的多字符代碼。 對于&符號,實(shí)體參考應(yīng)該是&amp;,我將在下面的例子中使用:





John
Doe


Jane
Doe
Crime & Punishment


請注意,我已經(jīng)用了&amp;實(shí)體參考?,F(xiàn)在XML解析器處理元素將沒有任何問題。但是請注意,&符號不是唯一會產(chǎn)生錯(cuò)誤的字符。 XML標(biāo)準(zhǔn)標(biāo)識了應(yīng)該用實(shí)體引用替換的五個(gè)字符,就像我在上面的例子中所做的那樣:

小于(<):替換為&lt;

大于(>):替換為&gt;

和號(&):替換&amp;

撇號("):替換為"

引號(“):替換為”

該示例提出的另一個(gè)問題是子元素不一定要從一個(gè)父實(shí)例到另一個(gè)父實(shí)例相同。你可以看到,元素的第一個(gè)實(shí)例只包含子元素,但元素的第二個(gè)實(shí)例包含子元素以及元素。只要你的子元素形成良好,就可以包括描述和定義數(shù)據(jù)所需的任何元素。

總結(jié)

在這個(gè)級別,我們已經(jīng)看到組成一個(gè)XML文檔需要的主要組件。 元素作為所有XML文檔的基本構(gòu)建塊,每個(gè)元素由開始標(biāo)簽和結(jié)束標(biāo)簽劃定,數(shù)據(jù)值本身被包含在這兩個(gè)標(biāo)簽之間。 元素可以彼此嵌入,但是一個(gè)元素 - 根 - 必須作為XML文檔中所有其他元素的父元素。 元素還可以包括被定義為元素的開始標(biāo)簽的一部分的屬性。

我們已經(jīng)盡可能方便地了解了如何組織一個(gè)XML文檔,但本課程的目的并不是培養(yǎng)如何創(chuàng)建這些類型的文檔,而是提供XML的介紹以便大家能更有效地在SQL Server中使用XML工作 。 在下一節(jié),我們將介紹如何在SQL Server中實(shí)現(xiàn)XML數(shù)據(jù)類型,以及如何將其分配給列和變量以便存儲XML文檔和XML片段。

原文

Stairway to XML: Level 1 - Introduction to XML

By Rob Sheldon, 2014/03/26 (first published: 2012/09/20)

The Series

This article is part of the Stairway Series: Stairway to >XML

XML has been part of the SQL Standard since 2003, and it is also essential for any DBA because so many of the dynamic management views return XML data. Now that the industry is more used to data defined by document markup, it is becoming more important than ever for Database Developers and DBAs to understand the technology and to know where it makes sense to use XML. In this series of articles, Robert Sheldon flexes his talent to make the complicated seem simple. Note: This series of articles is now available as an eBook.

Support for the eXtensible Markup Language (XML) was first introduced in SQL Server with the release of SQL Server 2000. However, XML-related features were limited to data management capabilities that focused on mapping relational and XML data. For example, SQL Server 2000 added the FOR XML clause, which lets you return relational query results as XML.

However, it wasn’t until the release of SQL Server 2005—when the XML data type was added—that support for XML got interesting. The XML data type lets you natively store XML documents in columns and variables configured with that type. The data type also supports a set of methods you can use to retrieve and modify specific components within the XML document.

To take full advantage of the XML-related features supported in SQL Server, you might find it useful to have a fundamental understanding of XML itself. To that end, this first Level of the Stairway to XML series explains what XML is and describes the various components that make up an XML document.

An Overview of XML

Similar to the HyperText Markup Language (HTML), XML is a markup language that uses tags to delineate and describe the nature of the data associated with those tags. What makes XML extensible is its self-describing nature, that is, you create tags that are specific to the data values contained in the XML document. In HTML, those tags are pre-defined. (XML’s extensible nature will become clearer as we work through the XML components.)

Despite its extensibility, XML is still a standardized language that must conform to a specific set of formatting rules, as defined by the World Wide Web Consortium (W3C). Because of this standardization, the language has been widely adopted in order to transport and store data, unlike HTML, which is used to display data. XML makes it possible to easily share data among heterogeneous systems, regardless of hardware, operating system, or application type, and XML’s universal adoption means that data can be processed with little human intervention. At the same time, you can control how the data is described, while also controlling how the data is ordered and displayed.

XML Components

The primary components that make up an XML document—and the rules that govern the use of >those components—are generally very straightforward, but you must adhere strictly to these rules in order for an XML document to be properly processed by the SQL Server XML parser.

There are primarily two types of information included in an XML document: the data to be stored and the tags that describe the data. A tag is made up of a set of angle brackets (< >) that enclose a descriptive word or compound word (no spaces) that describes the data associated with the tag. It’s because of the self-describing nature of these tags that XML is often considered a meta-language.

Each discrete piece of stored data is enclosed in an opening tag and a closing tag, as shown in the following example:

John Doe

In this case, the opening tag is , and the closing tag is . Notice that a forward slash precedes the tag description in the end tag. A forward slash must precede all end tags, but the language of the tag must be the same as the opening tag, which in the example above is Person. I could have chosen a name other than Person, including a name that has nothing to do with people, but a good practice is to always provide tag names that best describe the data enclosed in the opening and closing tags. In this case, the tags are describing the name of a person, John Doe, thus the tag name .

Together, the tags and enclosed data represent a single element. However, an element does not always have to contain data. An empty element can be rendered in one of two ways. The first is by specifying the opening and closing tags, but including no data, as I do in the following example:

 

Another way to represent an empty element is use only one set of brackets, but still include the forward slash:


Again, this method can be used only when an element contains no value. As you’ll see later in the Stairway to XML series, a schema might require an element for which there is no value. In that case, you can use the shortened format to represent the both tags of the element.

Whether or not an element contains a value, whenever both tags are used, the opening and closing tags must match exactly, down to the capitalization (except for the forward slash in the closing tag). For instance, the following element generates an error in the SQL Server XML parser because the case is different between the two tags:

John Doe  

The descriptive word in the opening tag is all lowercase; however, the descriptive word in the closing tag begins with a capital letter. The opening and closing tags must match to be considered proper, or well formed, XML.

You can, however, embed elements within each other. In the following example, I embed two instances of the element within the element:


John Doe
Jane Doe
  

Notice that each element is complete in itself. It includes the opening and closing tags and the data they enclose. Elements embedded in other elements are referred to as child elements or, in some cases, subelements. The outer element, in this case, , is the parent element. The parent element at the highest level of an XML document is considered the root element. All XML documents must have one, and only one, root element. So the element in the example above is the parent element to the two elements, and it is the root element for the XML document.

SQL Server also permits you to store XML fragments in an XML column or variable. A fragment is a chunk of XML code without a root element, such as the two elements shown in the following example:

John Doe
Seattle, WA  

The elements must still be well formed XML, that is, have matching tags that enclose the data, but they don’t have to be an XML document. As you’ll see later in the Stairway to XML series, you can specify that only XML documents be permitted in an XML column or variable, but for now just know that SQL Server distinguishes between XML documents and fragments and can store both.

When you embed elements within other elements, you must ensure that the child elements are complete before you end the parent element. For instance, in the following example, I end the element before the element, which causes the SQL Server XML parser to generate an error:

John Doe  

You must ensure that your child elements are complete no matter how many levels contain embedded elements. In this following example, the and elements are embedded in each element, and the elements are embedded in the element:



John
Doe


Jane
Doe

  

In this case, the elements act as both child and parent elements. Notice, however, that each embedded element, regardless of the level, falls completely within the opening and closing tags of the parent element. For example, the first instances of the and elements fall completely within the first instance of the element, and the two instances of the elements fall completely within the element, which is the document’s root element.

Elements can also have attributes associated with them. An attribute is a property to which you can assign a value. The attribute is defined as part of the element’s opening tag. In the following example, I’ve added the id attribute to each instance of the element:



John
Doe


Jane
Doe

 

As the example demonstrates, an attribute consists of the attribute name (in this case, id), followed by an equal sign and the attribute value, enclosed in double quotes. So the id attribute for the first instance of the element has a value of 1234, and the id attribute for the second instance of the element has a value of 5678.

Another component contained in many XML documents is the declaration, which at a minimum specifies the version of the XML standard that the document conforms to. To date, there are only two versions: 1.0 and 1.1. If using XML 1.0, the declaration is not necessary; however, XML 1.1 requires one. For that reason, you should be aware of how to include a declaration in your XML document.

If you include a declaration, you must place it at the beginning of the document, start the declaration with the opening tag, and end it with the ?> closing tag. In addition, you must include the xml keyword (lowercase) and the version attribute (also lowercase). Another attribute commonly included, although optional, is encoding, which specifies the character encoding used for the XML document. In the following example, I include a declaration that specifies version
1.0 and an encoding of UTF-8, which means the data is stored as a sequence of 8-bit Unicode characters:




John
Doe


Jane
Doe

  

You can also add comments to your XML documents. To do so, simply precede the comment with the -- tag and end it with the --> tag, as I’ve done in the following example:





John
Doe


Jane
Doe

  

As you can see, I’ve added the comment A list of current clients, which I’ve enclosed in the comment tags. The SQL Server XML parser will ignore anything within the tags, so you can use the commenting feature not only to provide information about the XML document and its data, but also to preserve parts of the XML code that you want to hang on to but you don’t want to have processed as part of the document.

Another consideration when working with XML is that certain characters cannot be parsed when they appear in element values. For example, you cannot include an ampersand (&) in an element’s value, as I’ve done in the child element in the following example:





John
Doe


Jane
Doe
Crime & Punishment

  

If I try to assign this XML document to an XML column or variable, the child element will cause the parser to generate an error because the value Crime & Punishment includes the ampersand. You must replace this type of character with an entity reference that tells the parser to preserve the character as it is originally intended. An entity reference begins with an ampersand and ends with a semi-colon and in between includes a multi-character code that represents the original value. For an ampersand, the entity reference should be &;, which I use in the following example:





John
Doe


Jane
Doe
Crime & Punishment


Notice that I’ve replaced the ampersand with the &; entity reference. Now the XML parser will handle the element with no problem. But note that the ampersand is not the only character that will generate an error. The XML standard identifies five characters that should be replaced with entity references, as I’ve done in the above example:

Less than (<): replace with <

Greater than (>): replace with >

Ampersand (&): replace with &

Apostrophe ("): replace with "

Quotation mark ("): replace with "

Another issue that the example raises is the fact that the child elements do not have to be the same from one parent instance to the next. As you can see, the first instance of the element contains only the and child elements, but the second instance of the element contains the and child elements, as well as the element. As long as your child elements are well formed, you can include whatever elements necessary to delineate and define your data.

Summary

In this Level, we’ve looked at the primary components that make up an XML document. Elements serve as the basic building blocks for all XML documents, with each element being delineated by an opening tag and a closing tag and the data value itself being enclosed between those two tags. Elements can be embedded within each other, but one element—the root—must act as the parent to all other elements in an XML document. An element can also include attributes, which are defined as part of an element’s opening tag.

As handy as it might be to know how to put together an XML document, the purpose of this Level has not been to train you in how to create these types of documents, but rather to provide an introduction to XML so you can more effectively work with XML in SQL Server. In the next Level, we’ll look at how the XML data type is implemented in SQL Server and how it can be assigned to columns and variables in order to store both XML documents and XML fragments.

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://systransis.cn/yun/110373.html

相關(guān)文章

  • JavaScript 簡介

    摘要:簡介原文鏈接簡稱是一種輕量級,解釋型的編程語言,其函數(shù)是一等公民。標(biāo)準(zhǔn)的目標(biāo)是讓任何一種程序設(shè)計(jì)語言能操控使用任何一種標(biāo)記語言編寫出的任何一份文檔。核心規(guī)定了如何映射基于的文檔結(jié)構(gòu),以便簡化對文檔的任意部分的訪問和操作。 JavaScript 簡介 原文鏈接 JavaScript ( 簡稱:JS ) 是一種 輕量級,解釋型 的編程語言,其函數(shù)是一等公民。眾所周知,它是用于網(wǎng)頁開發(fā)的腳...

    URLOS 評論0 收藏0
  • 做一名精致的JavaScripter 01:JavaScript簡介

    摘要:精致從細(xì)節(jié)做起。標(biāo)準(zhǔn)會在每年的月發(fā)布一次,作為當(dāng)年的正式版本,便是年發(fā)布的正式版本。支持情況各大瀏覽器對的支持情況瀏覽器支持情況對的支持情況支持情況。在瀏覽器中基于實(shí)現(xiàn)的已經(jīng)成為的重要組成部分。 精致從細(xì)節(jié)做起。前端的工作也有一段時(shí)間了,大大小小的前端框架都有接觸過,越是深入學(xué)習(xí)越是感覺之前的學(xué)習(xí)過于粗糙,基礎(chǔ)不夠扎實(shí),于是準(zhǔn)備近期把JavaScript的基礎(chǔ)知識點(diǎn)梳理一下,查缺補(bǔ)漏,...

    張巨偉 評論0 收藏0
  • Nginx深入了解-進(jìn)階(一)

    摘要:用來作為靜態(tài)資源服務(wù)瀏覽器緩存跨域防盜鏈等。非服務(wù)器動態(tài)運(yùn)行生成的文件。防盜鏈配置配置實(shí)例這里只允許頭為的地址和搜索過來的,可以便于優(yōu)化 Nginx用來作為靜態(tài)資源web服務(wù);CDN、瀏覽器緩存、跨域、防盜鏈等。 非服務(wù)器動態(tài)運(yùn)行生成的文件。 類型 種類 瀏覽器端渲染 HTML、CSS、JS 圖片 JPG、GIF、JPEG、PNG 視頻 FLV、MPEG 文件 T...

    reclay 評論0 收藏0
  • AJAX 的進(jìn)階使用(Blob、ArrayBuffer、FormData、Document、JSON

    摘要:讓應(yīng)用程序擁有異步讀取存儲在用戶計(jì)算機(jī)上文件或原始數(shù)據(jù)緩沖區(qū)的能力,使用或?qū)ο笾付ㄒx取的文件或數(shù)據(jù)。對象用來表示通用的固定長度的原始二進(jìn)制數(shù)據(jù)緩沖區(qū)。事實(shí)上,沒有名為的全局對象,也沒有一個(gè)名為的構(gòu)造函數(shù)。 Ajax 即 Asynchronous Javascript And XML (異步 JavaScript 和 XML),是指一種創(chuàng)建交互式網(wǎng)頁應(yīng)用的網(wǎng)頁開發(fā)技術(shù)。在無需重新加載整...

    wean 評論0 收藏0

發(fā)表評論

0條評論

最新活動
閱讀需要支付1元查看
<