TW201248429A - Method for applying custom tags to XML document and the system thereof - Google Patents

Method for applying custom tags to XML document and the system thereof Download PDF

Info

Publication number
TW201248429A
TW201248429A TW100118769A TW100118769A TW201248429A TW 201248429 A TW201248429 A TW 201248429A TW 100118769 A TW100118769 A TW 100118769A TW 100118769 A TW100118769 A TW 100118769A TW 201248429 A TW201248429 A TW 201248429A
Authority
TW
Taiwan
Prior art keywords
file
xml
custom
font
information
Prior art date
Application number
TW100118769A
Other languages
Chinese (zh)
Inventor
Chun-Lin Yeh
Original Assignee
Asic Pacific Gamer Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Asic Pacific Gamer Co filed Critical Asic Pacific Gamer Co
Priority to TW100118769A priority Critical patent/TW201248429A/en
Publication of TW201248429A publication Critical patent/TW201248429A/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention discloses a method for applying custom tags to XML document and the system thereof. First, an original XML document containing custom tags is provided. A custom tag searching module is provided to search the custom tags of the original XML document, and then the style setting corresponding to each of the custom tags is obtained from a custom tag database by a custom tag processing module. The style setting is added in the original XML document by a document modifying module to modify the original XML document. Therefore, the reader can interpret and display the modified XML document, thereby to show the effect of the style setting set by a user.

Description

201248429 六、發明說明: 【發明所屬之技術領域】 本發明係為一種將自訂標籤應用於XML文件之方法及其 系統’特別為一種應用於網頁顯示之將自訂標籤應用於xml 文件之方法及其系統。 【先前技術】 可延伸標示語言(extensible Markup Language, XML)是一 種電腦系統所能理解的資訊符號,並且XML被廣泛用來作為 跨平台之間的互動數據,主要可針對數據的内容並透過不同的 描述手段(例如:XSLT或CSS等)以完成最終的形式表達(例 如生成對應的HTML、PDF或者其他的檔案格式)。 由於XML是用來傳送及攜帶資料,並且xml中的資料 (例如標紙)在尚未被定義前是沒有任何意義的,因此需要由 使用者透過樣式語言先行定義。但是,因現行的XML文件(例 如網頁内容)大多採用固定的標籤以表達文件樣式,所以欲變 更文件樣式時,需要使用者自行修改標藏的内容方能進行變 更,然而如果經常有變更需求’或是有大量標籤需要變更時, 會造成使用者使用上的不方便。 舉例來說,如果在XML文件中的字型顏色已被設定為f〇nt color=”FFFFFF”時,當使用者欲更換字型顏色時,則需要一一 修改XML中標籤的内容。此外’在一般xml文件中,通常 只能指定固定的字型樣式’因此在透過文件閱讀器(例如網路 瀏覽器)解譯XML文件後,則無法依據使用者的需求顯示特 4 201248429 殊的字型樣式,以致於内容過於單調乏味。同樣的,如果在 XML文件中有圖型效果,也只能指定特定的圖型,而無法將 使用者輸入的文字直接轉換成圖型,因此大大地降低解譯又1^^ 文件後的顯示效果。 因此,在面對多媒體時代的來臨,為使XML文件解譯後 的内容更具吸引力及變化,在内容上加入多樣化的文件樣式及 美觀動人的字型及圖型已成為一種潮流,因此如何能讓使用者 在編輯XML文件時可更容易及簡單,又能豐富解譯後的文件 效果,實為目前亟需解決的課題。 【發明内容】 本發明係為一種將自訂標籤應用於XML文件之方法及其 系統’使用者可設定自訂標籤所對應的文件樣式或字型,並且 系統會自動變更XML文件的内容,以達到簡化XML文件編 輯方式的功效。 本發明係為一種將自訂標籤應用於XML文件之方法及其 系統,其係透過自訂標籤的使用,可使得被解譯後的XML文 件顯示更加豐富的内容效果。 /本發明係為一種將自訂標籤應用於XML文件之方法及其 其可將XML文件中的字竭置換成圖檔,並以圖槽的方 x以達到透過更多樣化的呈現方式顯示文件。 文件功效,本發縣提供—㈣自訂標«應用於XML xml心^包括下列步驟··提供—XML原始文件,其中 ' °括至少—自訂標籤;搜尋自訂減,其係藉 201248429 由-自訂標舰尋模組搜尋XML縣文件中之自訂標藏;取 得自訂標藏之-樣式設定資料,其係藉由一自訂標藏處理· 於:自訂縣#料庫中特XML相文件巾之自訂標藏對應 之樣式歧資H及變更XML原始文件,其鋪由一文件 變更模組根據樣式設定資料變更XML原始文件。 為達上述功效’本發明又提供—種將自訂標籤應用於乂紙 文件之系統’其包括:-自訂標籤資料庫,其係儲存有至少一 自訂標籤對應之-樣式設定資料;—自訂標籤搜尋模組, - XML原始文件中之-自訂標籤;一自訂標籤處理模組 係於自訂標籤資料庫中取得自訂標籤搜尋模组搜尋、 標籤對應之樣式設定資料;以及一文件變更模組,根= 訂標籤處_組輸出之樣式設定#_更XML原始文件據自 藉由本發明的實施,至少可達到下列進步功效. 一 J = 件的編輯方式’並同時大量變更xml文 二、 透過自訂標籤的使用,讓被解譯後的χΜ 加豐富的内容效果。 Tll7F^ 三、 使用者可透過自訂標籤定義文件樣式或字型 :::::容,到透過多樣化的呈現方式顯示: 為了使任何熟習相關技#者了解本發明之技術内 以施,且根據本說明書所揭露之内容、申請 式,任何熟習相關技藝者可輕易地理解本發明相關之目的2 點’因此將在實施方式中詳細敘述本發明之詳細特徵以及優 6 201248429201248429 VI. Description of the Invention: [Technical Field] The present invention relates to a method for applying a custom label to an XML file and a system thereof, particularly a method for applying a custom label to an xml file for web page display And its system. [Prior Art] Extensible Markup Language (XML) is a kind of information symbol that can be understood by computer systems, and XML is widely used as interactive data between platforms, mainly for the content of data and through different Descriptive means (eg XSLT or CSS, etc.) to complete the final form of expression (eg generate corresponding HTML, PDF or other file formats). Since XML is used to transfer and carry data, and the data in the xml (such as the stencil) has no meaning before it has been defined, it needs to be defined by the user through the style language. However, because the current XML files (such as web content) mostly use fixed tags to express the file style, if you want to change the file style, you need to modify the contents of the label to change it. However, if there are frequent changes, Or when there are a large number of tags that need to be changed, it will cause inconvenience to the user. For example, if the font color in the XML file has been set to f〇nt color=”FFFFFF”, when the user wants to change the font color, it is necessary to modify the content of the label in the XML one by one. In addition, in the general xml file, usually only a fixed font style can be specified. Therefore, after the XML file is interpreted by a file reader (such as a web browser), the special 4 201248429 special cannot be displayed according to the user's needs. The font style is such that the content is too tedious. Similarly, if there is a graphic effect in the XML file, only a specific graphic can be specified, and the text input by the user cannot be directly converted into a graphic, thereby greatly reducing the display after the interpretation of the 1^^ file. effect. Therefore, in the face of the advent of the multimedia era, in order to make the content of the XML file interpreted and more attractive, it is a trend to add a variety of file styles and beautiful fonts and graphics to the content. How to make the user easier and simpler when editing the XML file, and enrich the effect of the interpreted file, is an urgent problem to be solved. SUMMARY OF THE INVENTION The present invention is a method for applying a custom label to an XML file and a system thereof. The user can set a file style or font corresponding to the custom label, and the system automatically changes the content of the XML file to Achieve the effect of simplifying the way XML files are edited. The present invention is a method and system for applying a custom tag to an XML file, which enables the interpreted XML file to display a richer content effect through the use of a custom tag. / The present invention is a method for applying a custom label to an XML file and it can replace the word in the XML file with a picture file, and display it in a more diverse presentation manner by the square x of the picture slot. file. The function of the file, provided by the county - (4) custom label « applied to XML xml heart ^ includes the following steps · provide - XML original file, where ' ° at least - custom label; search for custom minus, which is borrowed from 201248429 by - Customize the standard ship search module to search for custom tags in the XML county file; obtain the custom-labeled-style setting data, which is processed by a custom label. in: Custom County #库库The XML-based document towel custom-labeled the corresponding pattern ambiguity H and the change XML original file, and the file change module changes the XML original file according to the style setting data. In order to achieve the above effects, the present invention further provides a system for applying a custom label to a crepe paper file, which comprises: a custom label database, which stores at least one custom label corresponding to the style setting data; Custom label search module, - the custom label in the XML original file; a custom label processing module obtains the custom label search module search, the label corresponding style setting data in the custom label database; A file change module, root = subscription label _ group output style setting #_ more XML original file from the implementation of the present invention, at least the following advancements can be achieved. A J = piece of editing mode 'and a large number of changes at the same time Xml text 2, through the use of custom tags, let the interpreted χΜ add rich content effects. Tll7F^ Third, the user can define the file style or font through the custom label:::::, to display through a variety of presentations: In order to make any familiar technology learn about the technology of the present invention, According to the content and application formula disclosed in the specification, anyone skilled in the art can easily understand the related objects of the present invention. Therefore, detailed features of the present invention and excellent 6 201248429 will be described in detail in the embodiments.

【實施方式】 <將自訂標籤應用於XML文件之系統> 第1圖係為本發明第一實施例之一種將自訂標籤應用於 XML文件之系統方塊圖。第2圖係為本發明實施例之一種樣 式設定資料與自訂標籤之對應表示意圖。第3圖係為本發明第 二實施例之一種將自訂標籤應用於XML文件之系統方塊圖。 第4圖係為本發明第三實施例之一種將自訂標籤應用於XML 文件之系統方塊圖。 如第1圖所示,本實施例係為一種將自訂標籤應用於XML 文件之系統,其包括:一自訂標籤資料庫20 ; —自訂標籤搜尋 模組30 ; —自訂標籤處理模組40 ; —文件變更模組50 ;以及 一文件閱讀器60。在此僅先敘述系統的架構,詳細的方法及顯 示内容將會再敘述如後。 自訂標籤資料庫20,其可設置於一自訂標籤伺服器中(圖 未示),並且於自訂標籤資料庫20中儲存有至少一樣式設定資 料。如第2圖所示,每一樣式設定資料又對應於一自訂標籤。 樣式設定資料可由使用者先行編寫並儲存於自訂標籤資料庫 20中,也就是說使用者可以預先設定自訂標籤的内容以便應用 於XML原始文件中,而且當使用者欲變更XML原始文件的 内容時,也僅需修改自訂標籤内的樣式設定資料,即可一併變 更XML原始文件解譯後的顯示内容。 如第2圖所示,樣式設定資料可例如包括字型間距、字型 7 201248429 大小…等,又或者還可再進一步包括一字型資訊。舉例來說, 自訂標籤Ct 1對應的樣式設定資料包括字型間距(padding: 1 Ορχ) 及字型大小(font size:25px),而自訂標籤ct2對應的樣式設定 資料除了包括字型間距(padding:10px)及字型大小(font size:25 px)之外,還包括字型資訊(f〇nt-face{font family:“demol,,;src: url(http://service.apgamers.net/tt/demo.ttf)})。 自訂標籤搜尋模組30,其係用以搜尋一 XML原始文件中 之一自訂標籤。自訂標籤搜尋模組30可以是已安裝於使用者 端之一裝置(例如電腦、智慧型手機、電子書閱讀器等)中的 一應用程式或是編寫於XML原始文件中的script程式碼,其 中XML原始文件還包括以HTML語法撰寫之文件。 自訂標籤處理模組40,其用以根據自訂標籤搜尋模組30 搜尋到的自訂標籤’與自訂標籤資料庫2〇中的自訂標藏比對, 再於自訂標籤資料庫20中取得與XML原始文件的自訂標籤對 應的樣式設定資料。自訂標籤搜尋模組3〇同樣可以是已安裝 於使用者端之裝置中的一應用程式。 文件變更模組50,其係為一種安裝於使用者端之裝置中的 一應用程式’而文件變更模組5〇接收到自訂標籤處理模組4〇 輸出的樣式設定資料後,便將樣式設定資料增加於XML原始 文件中’以變更XML原始文件。例如將自訂標籤cU的樣式 设定-貝料增加於XML原始文件中,以使得變更後的XML原 始文件包含了自訂標籤ctl的定義資訊。 文件閱讀器60用以解譯並顯示變更後的xml原始文件’ 文件閱讀器60係例如網頁瀏覽器(Internet explorer、Mozilla 8 201248429[Embodiment] <System for Applying Custom Label to XML File> Fig. 1 is a system block diagram for applying a custom label to an XML file according to the first embodiment of the present invention. Figure 2 is a schematic diagram of a correspondence table between a sample setting data and a custom label according to an embodiment of the present invention. Figure 3 is a block diagram of a system for applying a custom tag to an XML file in accordance with a second embodiment of the present invention. Figure 4 is a block diagram of a system for applying a custom tag to an XML file in accordance with a third embodiment of the present invention. As shown in FIG. 1, this embodiment is a system for applying a custom label to an XML file, which includes: a custom label database 20; a custom label search module 30; a custom label processing module. Group 40; - file change module 50; and a file reader 60. Only the architecture of the system will be described here. The detailed methods and display contents will be described later. The custom tag database 20 can be disposed in a custom tag server (not shown) and stored in the custom tag library 20 with at least one style setting. As shown in Fig. 2, each style setting data corresponds to a custom label. The style setting data can be written by the user and stored in the custom tag database 20, that is, the user can pre-set the content of the custom tag to be applied to the XML original file, and when the user wants to change the XML original file. In the content, you only need to modify the style setting data in the custom label to change the display content of the XML original file after interpretation. As shown in FIG. 2, the style setting data may include, for example, font spacing, font 7 201248429 size, etc., or may further include a font type information. For example, the style setting data corresponding to the custom label Ct 1 includes the font spacing (padding: 1 Ορχ) and the font size (font size: 25px), and the style setting data corresponding to the custom label ct2 includes the font spacing. (padding: 10px) and font size (font size: 25 px), including font information (f〇nt-face{font family: "demol,,;src: url(http://service.apgamers .net/tt/demo.ttf)}) The custom tag search module 30 is used to search for a custom tag in an XML original file. The custom tag search module 30 can be installed on the user. An application in one of the devices (such as a computer, a smart phone, an e-book reader, etc.) or a script code written in an XML original file, wherein the XML original file also includes a file written in HTML syntax. The label processing module 40 is configured to compare the customized label 'supplied by the customized label search module 30 with the customized label in the customized label database 2, and then customize the label database 20 Get the style setting data corresponding to the custom label of the XML original file. Customize The tag search module 3 can also be an application installed on the device of the user end. The file change module 50 is an application program installed in the device of the user terminal. After receiving the style setting data outputted by the custom label processing module 4〇, the group 5〇 adds the style setting data to the XML original file to change the XML original file. For example, the style setting of the custom label cU is set. It is added to the XML original file, so that the changed XML original file contains the definition information of the custom tag ctl. The file reader 60 is used to interpret and display the changed xml original file'. The file reader 60 is, for example, a web page. Browser (Internet explorer, Mozilla 8 201248429

Hrefox、Opera Web Browser 或 Google Chrome 等)。由於自訂 標籤ctl的定義資訊已增加於XML原始文件中,因此透過文 件閱讀器60解譯變更後的xml原始文件時,便會使自訂標籤 ctl定義的字碼以自訂標籤ctl對應的樣式設定資料(例如字型 間距(padding:10px)及字型大小(f〇ntsize:25px))顯示。 又如第3圖所示’自訂標籤處理模組4〇還可進一步包括 一字型產生單元41,並且自訂標籤搜尋模組3〇除了搜尋XML 原始文件中的自訂標籤外’還會同時搜尋xml原始文件中的 自訂標籤的字碼資訊,而自訂標籤處理模組40中的字型產生 單元41接收到自訂標籤搜尋模組30輸出的字碼資訊後,字型 產生單元41便會根據字碼,資訊及樣式設定資料中的字型資訊 生成至少一子集合字型檔案及其定址資訊,其中定址資訊包括 子集合字型檔案的網路位址,而且字型產生單元41可透過網 際網路與一字型資料庫7〇進行連結,以根據樣式設定資料中 的字型資訊於字塑資料庫70下載字型資料。 因此,文件變更模組50於變更XML原始文件時,除了將 自訂標籤對應的樣式設定資料增加於XML原始文件之外,還 會將子集合字型標案的定址資訊加入XML原始文件中。藉 此,文件閱讀器60可根據定址資訊内的網路位址下載子集合 字型檔案,並由文件閱讀器60對樣式設定資料及子集合字型 檔案進行解譯,以顯示樣式設定資料的樣式及子集合字变檔案 的字型。 如第4圖所示,自訂標籤處理模組4〇還可進一步包括一 圖騰顯示單元42。自訂標籤搜尋模組3〇除了搜尋XML原始 201248429 文件中的自訂標薇外,、吾+ 資訊。當圖騰顯示單元4=時搜白尋皿原始文件中的字碼 42接收到自訂標籤搜尋模組30輸出的 二 一文字圖㈣應表比對,而文字 存於一圖騰資料庫80中,並且文字圖檔對應 找引2 —子碼與—圖槽的對應關係。當圖騰顯示單元42 =的子碼貝訊與文字_對應表内的字碼相同時,圖騰顯示 凡42便會據此產生—圖料結位址與字竭資訊相互對應。 接著’文件變更模組5〇會將乂紙原始文件中與文字圖播 對應表中字喝相同的字碼資訊置換為圖檔連結位址,以變更 XML原始文件。而文件閱讀器6G則會根據圖槽連結位址下載 圖槽’並對樣式蚊韻及_進行解譯,以呈現樣式設定資 料的樣式及圖檔。 此外,自訂標籤處理模組40可同時包括字型產生單元41 示單it42’ α分m_XML原始文件中的字碼資訊 生成子集合字型檔案及圖檔連結位址,使得文件閱讀器6〇於 解譯變更後的XML原始文件時,可顯示特殊的字型並能以特 殊的圖檔取代一般的文字。 於一實施例中,上述自訂標籤資料庫20及自訂標籤處理 模組40可設置於-自訂標_服器(圖未示)中,自訂標藏 搜尋模組30、文件變更模組50及文件閱讀$ 6〇可設置於使用 者端之裝置(例如電腦、智慧型手機、電子書 等)中。 此外’自訂標_服11除了可包含上述所列之模組外,還可再 單獨設置有字型資料庫7〇,或是再同時設置有字型資料庫7〇 及®騰資料庫80。 201248429 於另一實施例中,在自訂標籤伺服器中可僅設置有自訂標 籤資料庫20,而使用者端之裝置則設置有自訂標籤處理模組 40、自訂標籤搜尋模組30、文件變更模組50及文件閱讀器60。 於上述各實施例中,使用者端之裝置還可透過網際網路與自訂 標籤伺服器進行連結。 &lt;將自訂標籤應用於XML文件之方法&gt; 第5圖係為本發明第一實施例之一種將自訂標籤應用於 XML文件之方法流程圖。第6A圖係為本發明實施例之一種包 含有自訂標籤搜尋模組之XML原始文件之示意圖。第6B圖 係為本發明實施例之一種XML原始文件之示意圖。第7圖係 為第6A圖中之XML原始文件變更後之示意圖。第8圖係為 文件閱讀器60解譯第6A圖之XML原始文件之顯示内容示意 圖。第9圖係為文件閱讀器60解譯第7圖之變更後xml原始 文件之顯示内容示意圖。 如第5圖所示,本實施例係為一種將自訂標籤應用於XMl 文件之方法,其包括下列步驟:提供一 XML原始文件(步驟 S10);搜尋XML原始文件中之自訂標籤(步驟S20);取得自 訂標籤之一樣式設定資料(步驟S30);變更XML原始文件(步 驟S40);以及顯示變更後之XML原始文件(步驟S50)。其中, 第5圖所示之方法流程圖可配合第1圖所示之系統方塊圖進行 說明。 提供一 XML原始文件(步驟S10):當欲透過文件閱讀器 60開啟XML原始文件時’可自一網頁伺服器取得XML原始 11 201248429 文件’而XML原始文件包括以HTML語法撰寫之文件。如第 6A圖及第6B圖所示,在XML原始文件中包括至少一自訂標 籤及至少一字碼資訊,例如在&lt;以1〉有夢最美,希望相隨&lt;/ctl&gt; 中’ &lt;ctl&gt;即是自訂標籤,而「有夢最美,希望相隨」則是受 到自訂標籤ctl規範的字碼資訊。 搜尋XML原始文件中之自訂標籤(步驟S20):參考第6 A圖,自訂標籤搜尋模組30可以是編寫於XML原始文件中的 script 程式喝,例如〈script language=”JavaScript” src=http://js. apgamer.net/tagl.js&gt;&lt;/script&gt;,又或者自訂標藏搜尋模組30可 以是已安裝於使用者端之裝置中的應用程式(圖未示)。自訂 標籤搜尋模組30可以搜尋XML原始文件中有關自訂標籤的資 訊,進而擷取在XML原始文件中的自訂標籤。 取得自訂標籤之一樣式設定資料(步驟S30):將自訂標 籤搜尋模組30搜尋到的自訂標籤傳送給自訂標籤處理模組 40,以使得自訂標籤處理模組4〇可將xml原始文件中的自訂 標籤與自訂標籤資料庫2〇中的自訂標籤比對,再於自訂標籤 資料庫20中取得與xml原始文件的自訂標籤對應的樣式設定 資料。自訂標籤資料庫2〇及樣式設定資料等說明已敘述於上 述實施例中,在此不再多加贅述。 變更XML原始文件(步驟S4〇):將取得的樣式設定資料 傳送至文件變更模組50,以使得文件變更模組50可根據樣式 設定資料變更XML原始文件,而文件變更模組50變更XML 原始文件的方式即為將自訂標籤對應的樣式設定資料加入在 XML原始文件中。如第7圖所示,假設由自訂標籤資料庫20 12 201248429 中取得的樣式設定資料為ctl{padding:10px; fontsize:25px}, 文件變更模組50便在XML原始文件中加A&lt;style type=’text/ css’&gt; ctl{padding:10px; fontsize:25px}&lt;/style&gt;,以變更 XML 原始文件。 顯示變更後之xml原始文件(步驟S50 ):如第8圖所示, 其係為文件閱讀器60解譯並顯示XML原始文件的内容,並請 再同時參考第9圖,當透過文件閱讀器60解譯並顯示變更後 的XML原始文件時,因已藉由文件變更模組50加入了自訂標 籤ctl的定義資訊,所以「有夢最美,希望相隨」這部份的字 碼即依照自訂標籤ctl的定義資訊顯示,並變更了這部份字碼 的字型間距及字型大小。 第10A圖係為本發明第二實施例之一種將自訂標籤應用 於XML文件之方法流程圖。第10B圖係為本發明實施例之一 種生成子集合字型檔案之方法流程圖。第U圖係為第6B圖中 之XML原始文件變更後之不意圖。第12圖係為文件閱讀器 6〇解譯第11圖之變更後XML原始文件之顯示内容示意圖。 又如第10A圖所示,於另一實施例中,一種將自訂標籤應 用於XML文件之方法可包括下列步驟:提供一 XML原始文 件(步驟S10);搜尋XML原始文件中之自訂標籤及字碼資訊 (步驟S21);取得自訂標籤之一樣式設定資料並生成至少一 子集合字型檔案及其定址資訊(步驟S31);變更XML原始文 件(步驟S41);以及顯示變更後之XML原始文件(步驟S51)。 第10A圖所示之方法流程與第5圖所示之方法流程大致相 同,但是步驟S21與步驟S20間之差異在於步驟S21又進一步 13 201248429 搜尋XML文件中的予竭資訊;步驟S31與步驟㈣間之差異 在於步驟S31又再進_步生成子集合字型槽案及其定址資 訊;步驟⑷肖步驟S4〇間之差異在於步驟如進一步將定址 資訊加入於XML原始文件中以變更xml原始文件;以及步 驟S51與步驟S50間之差異在於步驟S5i於解譯變更後的 原始文件時’同時對樣式狀資料及子集合字型槽案進行解 譯,以呈現樣式設定資料之樣式及子集合字㈣案之字型。此 外,第IGA ®所示的方法流程圖可配合第3 @所示的系統方塊 圖實施。 於步驟S21中’除了搜尋XML原始文件中之自訂標藏外, 自訂標籤搜尋模組30還同時搜尋xmL原始文件中的字碼資 訊。以第6A圖所示的XMl原始文件而言,自訂標籤搜尋模 組30就會搜尋到自訂標籤為ctl及字碼資訊為「有夢最美,希 望相隨」’又若以第6B圖所示的XML原始文件而言,自訂標 籤搜尋模組30就會搜尋到自訂標蕺為ct2及字碼資訊為「有夢 最美,希望相隨」。 接著,於步驟S31中,第3圖所示的自訂標籤處理模組 40中之字型產生單元41接收到自訂標籤搜尋模組30輸出的字 碼資訊後’便會根據字碼資訊及樣式設定資料中的字型資訊生 成至少一子集合字型檔案及其定址資訊,其中子集合字型檔案 例如是demo.ttf,而其定址資訊則包括子集合字型檔案的網路 位址例如是 http://service.apgamers.net/tt/demo.ttf,而且字型產 生單元41可透過網際網路與一字型資料庫70進行連結,以根 據樣式設定資料中的字型資訊於字型資料庫70下載字型資料。 201248429 又如第10B圖所示’字型產生單元41生成子集合字型槽 案之步驟包括:接收字碼資訊與字型資訊(步驟S3U);尋^ 符合字型資訊之字型(步驟S312);產生字螞資訊與字型圖像 間之索引表(步驟S313);以及產生子集合字型檔案(步驟s 314)。 字型產生單元41用以接收自訂標籤搜尋模組3〇找到的字 碼資訊,及自訂標籤處理模組40於自訂標籤資料庫2〇中對應 到的樣式設定資料的字型資訊(步驟S311 ),並根據字型資% 於字型資料庫70之原始字型資料中尋找符合字型資訊要求之 字型(步驟S312),其中原始字型資料係由至少一套字型所組 成,其來源包括TTF(Truetype字型檔案格式;)、TTC(Truetype 字型檔案集格式)、〇TF(opentype字型檔案格式)、XML(將字 型檔案存成XML格式)或DB(將字型檔案資料存放於資料庫中) 等。 子型產生早元41依據所接收到之字型資訊,從字型資料 庫70中搜尋確認是否有此字型,如字型產生單元“確認於字 型資料庫70中有與字型資訊要求的字型相符之字型後,即讀 取原始子型資料中此字型的定義格式,又將原字型無變動定義 之部分寫入新字型中。其中,原始字型資料中之每一字型中又 包括至少一字碼,並且每一字碼又至少對應有一字型圖像。 欠子I產生單元41又根據自訂標籤搜尋模組30找到的字碼 資訊與原始字型資料中找到的字型相比對,在符合的字型中取 得與字碼資字碼相符之字鳴’並取得與其對應的字型圖 像’藉此產生字碼資訊與字型圖像間的索引表(步驟S313)。 15 201248429 字型產生單元41於產生字碼和圖像間的索引表後,即可 根據索引表產生一文件閱讀器60可識別之子集合字型檔案(步 驟S314),其中子集合字型檔案係為原始字型檔案的子集合。 如第10A圖所示’於步驟S41中,文件變更模組50會將 樣式設定資料及子集合字型檔案的定址資訊加入於XML原始 文件。如第11圖所示,變更後的XML原始文件中新增了 &lt;sty le type=’text/css’&gt; ctl{font-family:’’demol,,; padding:10px; f ontsize:25px} @font-face{font-family:,Jdemo 15,; scr: url(http:/ /service.apgamers.net/tt/demo.ttf)}&lt;/style&gt;。因此,文件變更模 組50除了會將自訂標籤對應的樣式設定資料增加於XML原始 文件之外,還會將定址資訊(例如http://service.apgamers.net/ tt/demo.ttf)加入XML原始文件中。 藉此,在步驟S51中,文件閱讀器60即可根據定址資訊 下載子集合字型檔案,並由文件閱讀器60對樣式設定資料及 子集合字型檔案進行解譯,以呈現樣式設定資料的樣式及子集 合字型檔案的字型。如第12圖所示,「有夢最美,希望相隨」 這一字串即依照樣式設定資料的樣式及子集合字型檔案的字 型的設定顯示。 第13圖係為本發明第三實施例之一種將自訂標籤應用於 XML文件之方法流程圖。第14圖係為本發明實施例之一種文 字圖檔對應表之示意圖。第15圖係為本發明實施例之另一種 XML原始文件之示意圖。第16圖係為第15圖中之XML原始 文件變更後之示意圖。第17圖係為文件閱讀器60解譯第16 圖之變更後XML原始文件之顯示内容示意圖。 201248429 又如第13圖所示,又於另一實施例中,一種將自訂標籤 應用於XML文件之方法可包括下列步驟:提供一 XML原始 文件(步驟S10);搜尋XML原始文件中之自訂標籤及字碼資 訊(步驟S22);取得自訂標籤之一樣式設定資料並產生圖檔 連結位址(步驟S32);變更XML原始文件(步驟S42);以及 顯示變更後之XML原始文件(步驟S52)。 第13圖所示之方法流程與第5圖所示之方法流程大致相 同,但是步驟S22與步驟S20間之差異在於步驟S22又進一步 搜尋XML文件中的字碼資訊;步驟S32與步驟S30間之差異 在於步驟S32又再進一步產生一圖檔連結位址;步驟S42與步 驟S40間之差異在於步驟S42進一步將XML原始文件中與文 字圖檔對應表内之字碼相同之字碼資訊置換為圖檔連結位 址,以變更XML原始文件;以及步驟S52與步驟S50間之差 異在於步驟S52於解譯變更後的XML原始文件時,根據圖檔 連結位址下載圖檔,並由文件閱讀器60對樣式設定資料及圖 檔進行解譯,以呈現樣式設定資料之樣式及圖檔。此外,第13 圖所示的方法流程圖可配合第4圖所示的系統方塊圖實施。 於步驟S22中,自訂標籤搜尋模組30會同時搜尋XML原 始文件中之自訂標籤及字碼資訊。於步驟S32中,當圖騰顯示 單元42接收到自訂標籤搜尋模組30找到的字碼資訊後,便會 自一圖騰資料庫80中下載一文字圖檔對應表,並將字碼資訊 與文字圖檔對應表比對。如第14圖所示,文字圖檔對應表至 少包括一字碼與一圖檔的對應關係。舉例來說,字碼「愛」可 對應於心形的圖檔,字碼「車」可對應於汽車的圖檔,而字碼 17 201248429 「摩托車」則可對應於機車的圖檔。 當圖騰顯示單元42找到的字竭資訊與文字圖槽對應表内 的字碼相同時,圖騰顯示單元42便會產生與此字碼對應的圖 檔連結位址,例如圖騰顯示單元42可在第15圖的字碼資訊中 找到「車」及「摩托車」與文字圖檔對應表中的字碼相同,而 圖騰顯示單元42便會產生與字碼「車」對應的圖檔連結位址h ttp://pic.apgamer.net/upload/car.jpg 以及與字碼「摩托車」對應 的圖槽連結位址 http://pic.apgamer.net/upload/motor.jpg。 接著’請同時參考第16圖’在步驟S42中,文件變更模 組50除了將自訂標戴對應的樣式設定資料加入於xml原始文 件外’還會將XML原始文件中與文字圖檔對應表的字碼相同 的字碼資訊置換為圖檔連結位址,以變更XML原始文件。值 得注意的是,字碼的取代順序是依字碼資訊中字串的長度進行 排序’並且是以字串較長的優先取代,因此如第17圖所示, 字碼「摩托車」中的「車」並不會被置換為汽車的圖檔。 於步驟S52中,文件閱讀器60在解譯變更後的XML原始 文件時,會依照圖檔連結位址下載圖檔,並對樣式設定資料及 圖檔進行解譯,以顯示變更後的XML原始文件的樣式設定資 料的樣式及圖檔(如第17圖所示)。 惟上述各實施例係用以說明本發明之特點,其目的在使熟 習技術者能瞭解本發明之内容並據以實綠,而非限定本發明之 專利範圍,故凡其他未脫離本發明所揭示之精神而完成之等效 修飾或修改,仍應包含在以下所述之申請專利範圍中。 201248429 【圖式簡單說明】 第1圖係為本發明第一實施例之一種將自訂標籤應用於XML 文件之系統方塊圖。 第2圖係為本發明實施例之一種樣式設定資料與自訂標籤之對 應表示意圖。 第3圖係為本發明第二實施例之一種將自訂標藏應用於XML 文件之系統方塊圖。 第4圖係為本發明第三實施例之一種將自訂標籤應用於XML 文件之系統方塊圖。 第5圖係為本發明第一實施例之一種將自訂標籤應用於XML 文件之方法流程圖。 第6A圖係為本發明實施例之一種包含有自訂標籤搜尋模組之 XML原始文件之示意圖。 第6B圖係為本發明實施例之一種XML原始文件之示意圖。 第7圖係為第6A圖中之XML原始文件變更後之示意圖。 第8圖係為文件閱讀器解譯第6A圖之XML原始文件之顯示 内容示意圖。 第9圖係為文件閱讀器解譯第7圖之變更後XML原始文件之 顯示内容示意圖。 第10A圖係為本發明第二實施例之一種將自訂標籤應用於 XML文件之方法流程圖。 第10B圖係為本發明實施例之一種生成子集合字型檔案之方 法流程圖。 201248429 第11圖係為第6B圖中之XML原始文件變更後之示意圖。 第12圖係為文件閱讀器解譯第11圖之變更後XML原始文件 之顯示内容示意圖。 第13圖係為本發明第三實施例之一種將自訂標籤應用於XML 文件之方法流程圖。 第14圖係為本發明實施例之一種文字圖檔對應表之示意圖。 第15圖係為本發明實施例之另一種XML原始文件之示意圖。 第16圖係為第15圖中之XML原始文件變更後之示意圖。 第17圖係為文件閱讀器解譯第16圖之變更後XML原始文件 之顯示内容示意圖。 【主要元件符號說明】 20................自訂標籤資料庫 30................自訂標籤搜尋模組 40 ................自訂標籤處理模組 41 ................字型產生單元 42 ................圖騰顯示單元 50................文件變更模組 60................文件閱讀器 70................字型資料庫 80................圖騰資料庫Hrefox, Opera Web Browser or Google Chrome, etc.). Since the definition information of the custom tag ctl has been added to the XML original file, when the modified xml original file is interpreted by the file reader 60, the font defined by the custom tag ctl is in the style corresponding to the custom tag ctl. Set the data (such as font spacing (padding: 10px) and font size (f〇ntsize: 25px)) display. As shown in FIG. 3, the 'custom label processing module 4' may further include a font generating unit 41, and the custom label searching module 3 will search for the custom label in the XML original file. At the same time, the font information of the custom tag in the xml original file is searched, and after the font generating unit 41 in the custom tag processing module 40 receives the word information output by the custom tag search module 30, the font generating unit 41 At least one sub-set font file and its addressing information are generated according to the font information in the word code, information and style setting data, wherein the address information includes a network address of the sub-set font file, and the font generating unit 41 can pass The Internet is linked to a font database 7 to download the font data in the font database 70 according to the font information in the style setting data. Therefore, when the XML change file module changes the XML original file, in addition to adding the style setting data corresponding to the custom label to the XML original file, the file information of the sub-set font type is added to the XML original file. Thereby, the file reader 60 can download the sub-set font file according to the network address in the address information, and the file reader 60 interprets the style setting data and the sub-set font file to display the style setting data. The style and sub-set words change the font of the file. As shown in FIG. 4, the custom tag processing module 4A may further include a totem display unit 42. Custom label search module 3, in addition to searching for custom label in the XML original 201248429 file, I + information. When the totem display unit 4=, the word code 42 in the original search file is received by the custom tag search module 30, and the text is stored in a totem database 80, and the text is stored in a totem database 80. The file file corresponds to the correspondence between the 2-subcode and the map slot. When the subcode of the totem display unit 42= is the same as the code in the text_correspondence table, the totem display 42 will be generated accordingly—the image node address and the word exhaust information correspond to each other. Then, the file change module 5 置换 replaces the same word code information in the original file of the paper with the text in the text map corresponding to the image link address to change the original XML file. The file reader 6G downloads the map slot based on the slot connection address and interprets the style mosquito and _ to present the style and image of the style setting data. In addition, the custom tag processing module 40 can include the font generation unit 41 at the same time, and the word information generation sub-set font file and the image link address in the original file of the m_XML original file, so that the file reader 6 When the modified XML original file is interpreted, special fonts can be displayed and the general text can be replaced with a special image file. In an embodiment, the custom tag database 20 and the custom tag processing module 40 can be disposed in a custom tag server (not shown), the custom tag search module 30, and the file change mode. Group 50 and file reading $6 can be set in the device on the user side (such as a computer, smart phone, e-book, etc.). In addition, in addition to the modules listed above, the custom label _ service 11 can also be separately provided with a font database 7 〇, or a font database 7 ® and a 腾 database 80 at the same time. . In another embodiment, only a custom tag database 20 may be provided in the custom tag server, and the user device is provided with a custom tag processing module 40 and a custom tag search module 30. The file change module 50 and the file reader 60. In the above embodiments, the device on the user side can also be connected to the custom tag server via the Internet. &lt;Method of Applying Custom Label to XML File&gt; Fig. 5 is a flowchart of a method of applying a custom label to an XML file according to the first embodiment of the present invention. Figure 6A is a schematic diagram of an XML original file containing a custom tag search module in accordance with an embodiment of the present invention. Figure 6B is a schematic diagram of an XML original file according to an embodiment of the present invention. Fig. 7 is a schematic diagram showing the change of the XML original file in Fig. 6A. Fig. 8 is a schematic diagram showing the display contents of the XML original file of the file reader 60 interpreting Fig. 6A. Fig. 9 is a schematic diagram showing the display contents of the xml original file after the file reader 60 interprets the modification of Fig. 7. As shown in FIG. 5, this embodiment is a method for applying a custom label to an XM1 file, which includes the steps of: providing an XML original file (step S10); searching for a custom label in the XML original file (step S20); acquiring one of the custom label style setting materials (step S30); changing the XML original file (step S40); and displaying the changed XML original file (step S50). The method flow chart shown in Figure 5 can be explained in conjunction with the system block diagram shown in Figure 1. An XML original file is provided (step S10): when the XML original file is to be opened by the file reader 60, the XML original 11 201248429 file can be obtained from a web server and the XML original file includes the file written in HTML syntax. As shown in FIG. 6A and FIG. 6B, at least one custom tag and at least one word code information are included in the XML original file, for example, in <1> having the most beautiful dream, and wishing to follow &lt;/ctl&gt; in &lt;;ctl&gt; is a custom label, and "the most beautiful dream, hope to follow" is the word information of the custom label ctl specification. Searching for the custom tag in the XML original file (step S20): Referring to FIG. 6A, the custom tag search module 30 can be a script program written in the XML original file, for example, <script language=”JavaScript” src= Http://js. apgamer.net/tagl.js&gt;&lt;/script&gt;, or the custom tag search module 30 may be an application (not shown) that has been installed on the device of the user. The custom tag search module 30 can search for information about custom tags in the XML source file to retrieve custom tags in the XML source file. Obtaining a style setting data of the custom label (step S30): transmitting the customized label searched by the custom label search module 30 to the custom label processing module 40, so that the customized label processing module 4 The custom tag in the xml original file is compared with the custom tag in the custom tag database 2, and the style setting data corresponding to the custom tag of the xml original file is obtained in the custom tag database 20. Descriptions of the custom tag database 2 and the style setting data have been described in the above embodiments, and will not be described again. Changing the XML original file (step S4): transferring the obtained style setting data to the file change module 50 so that the file change module 50 can change the XML original file according to the style setting data, and the file change module 50 changes the XML original The way of the file is to add the style setting data corresponding to the custom label to the XML original file. As shown in Fig. 7, assuming that the style setting data obtained by the custom tag database 20 12 201248429 is ctl{padding:10px; fontsize:25px}, the file change module 50 adds A&lt;style to the XML original file. Type='text/ css'&gt;ctl{padding:10px;fontsize:25px}&lt;/style&gt; to change the XML source file. The changed xml original file is displayed (step S50): as shown in FIG. 8, it is the file reader 60 interpreting and displaying the contents of the XML original file, and please refer to FIG. 9 at the same time, when through the file reader. 60. When the translated XML original file is interpreted and displayed, since the definition information of the custom tag ctl has been added by the file change module 50, the word "the most beautiful dream, the hope to follow" is in accordance with The definition information of the label ctl is displayed, and the font spacing and font size of the part of the code are changed. Figure 10A is a flow chart showing a method of applying a custom tag to an XML file in accordance with a second embodiment of the present invention. FIG. 10B is a flowchart of a method for generating a sub-set font file according to an embodiment of the present invention. The U-picture is not intended to be changed after the XML original file in Fig. 6B. Figure 12 is a schematic diagram showing the display contents of the XML original file after the modification of the file reader 6〇. As shown in FIG. 10A, in another embodiment, a method for applying a custom tag to an XML file may include the steps of: providing an XML original file (step S10); searching for a custom tag in the XML original file. And the code information (step S21); acquiring one of the custom label style setting data and generating at least one sub-set font file and its addressing information (step S31); changing the XML original file (step S41); and displaying the changed XML Original file (step S51). The method flow shown in FIG. 10A is substantially the same as the method flow shown in FIG. 5, but the difference between step S21 and step S20 is that step S21 and further 13 201248429 search for exhaustive information in the XML file; step S31 and step (4) The difference between the steps is to further generate the sub-set font slot and its addressing information in step S31; the difference between step (4) and step S4 is that the step further includes adding the addressing information to the XML original file to change the xml original file. And the difference between step S51 and step S50 is that in step S5i, when the original file after the change is interpreted, 'the style data and the sub-set font slot are interpreted at the same time to present the style and sub-set words of the style setting data. (4) The font of the case. In addition, the method flow diagram shown in IGA ® can be implemented in conjunction with the system block diagram shown in Section 3. In step S21, in addition to searching for a custom tag in the XML original file, the custom tag search module 30 also searches for the word code information in the xmL original file. In the case of the XMl original file shown in FIG. 6A, the custom tag search module 30 searches for the custom tag as ctl and the code information is "the most beautiful dream, hope to follow" and if it is in Figure 6B In the case of the XML original file, the custom tag search module 30 searches for the custom tag ct2 and the code information as "the most beautiful dream, hope to follow." Then, in step S31, the font generation unit 41 in the custom label processing module 40 shown in FIG. 3 receives the word information output by the custom label search module 30, and then sets the information according to the word information and style. The font information in the data generates at least one sub-set font file and its addressing information, wherein the sub-set font file is, for example, demo.ttf, and the address information includes the network address of the sub-set font file, for example, http ://service.apgamers.net/tt/demo.ttf, and the font generating unit 41 can connect with the font database 70 through the Internet to set the font information in the data according to the style. Library 70 downloads the font data. 201248429 As shown in FIG. 10B, the step of generating the sub-set font slot by the font generation unit 41 includes: receiving the word information and the font information (step S3U); and searching for the font of the font information (step S312). Generating an index table between the word information and the font image (step S313); and generating a sub-set font file (step s 314). The font generating unit 41 is configured to receive the font information found by the custom label search module 3 and the font information of the style setting data corresponding to the custom label processing module 40 in the custom label database 2 (steps) S311), and searching for a font conforming to the font information requirement according to the font type % in the original font data of the font database 70 (step S312), wherein the original font data is composed of at least one set of fonts. Sources include TTF (Truetype font file format;), TTC (Truetype font file format), 〇TF (opentype font file format), XML (store font file in XML format) or DB (type font) The archive data is stored in the database) and so on. The subtype generation early element 41 searches for the font type 70 from the font database 70 to confirm whether the font has the font type, such as the font generation unit "confirmed in the font database 70 and the font information request. After the font conforms to the font, the definition format of the font in the original subtype data is read, and the part of the original font without change definition is written into the new font. Among them, each of the original font data The font further includes at least one character code, and each of the words corresponds to at least one font image. The under-sub-I generating unit 41 is further found according to the word information found by the custom label search module 30 and the original font data. The word type is compared with the word type that matches the word code word code and obtains the font image corresponding thereto, thereby generating an index table between the word code information and the font image (step S313) 15 201248429 After generating the index table between the word code and the image, the font generating unit 41 can generate a sub-set font file recognizable by the file reader 60 according to the index table (step S314), wherein the sub-set font file system Original font A sub-collection of the case. As shown in FIG. 10A, in step S41, the file change module 50 adds the style setting data and the address information of the sub-set font file to the XML original file. As shown in FIG. 11, the change is shown in FIG. Added "sty le type='text/css'&gt;ctl{font-family:''demol,,;padding:10px; f ontsize:25px} @font-face{font- Family:, Jdemo 15,; scr: url(http:/ /service.apgamers.net/tt/demo.ttf)}&lt;/style&gt; Therefore, the file change module 50 will not only match the style of the custom label. The setting data is added to the XML original file, and the addressing information (for example, http://service.apgamers.net/ tt/demo.ttf) is also added to the XML original file. Thereby, in step S51, the file reader 60, the sub-set font file can be downloaded according to the address information, and the style setting data and the sub-set font file are interpreted by the file reader 60 to present the style of the style setting data and the font of the sub-set font file. As shown in Figure 12, the phrase "There is the most beautiful dream, hope to follow" is set according to the style. The style and type the word subset of the set of display font file. Figure 13 is a flow chart showing a method of applying a custom tag to an XML file according to a third embodiment of the present invention. Figure 14 is a schematic diagram of a correspondence table of text files according to an embodiment of the present invention. Figure 15 is a schematic diagram of another XML original file in accordance with an embodiment of the present invention. Figure 16 is a schematic diagram showing the change of the XML original file in Figure 15. Fig. 17 is a schematic diagram showing the display contents of the XML original file after the file reader 60 interprets the change of Fig. 16. 201248429 As shown in FIG. 13, in another embodiment, a method for applying a custom label to an XML file may include the following steps: providing an XML original file (step S10); searching for the XML original file Binding the tag and the word information (step S22); acquiring one of the custom tag style setting data and generating the image link address (step S32); changing the XML original file (step S42); and displaying the changed XML original file (step S52). The method flow shown in FIG. 13 is substantially the same as the method flow shown in FIG. 5, but the difference between step S22 and step S20 is that step S22 further searches for the word information in the XML file; the difference between step S32 and step S30 In step S32, a picture link address is further generated; the difference between step S42 and step S40 is that step S42 further replaces the word information in the XML original file with the same code in the text file correspondence table as the image link position. Address to change the XML original file; and the difference between step S52 and step S50 is that in step S52, when the changed XML original file is interpreted, the image file is downloaded according to the image link address, and the style is set by the file reader 60. The data and the image file are interpreted to present the style and image of the style setting data. In addition, the method flow chart shown in Fig. 13 can be implemented in conjunction with the system block diagram shown in Fig. 4. In step S22, the custom tag search module 30 simultaneously searches for the custom tag and the tag information in the XML original file. In step S32, when the totem display unit 42 receives the word information found by the custom tag search module 30, it downloads a text file correspondence table from a totem database 80, and corresponds the word information to the text file. Table comparison. As shown in Fig. 14, the correspondence table of the text file includes at least a correspondence between a word code and a picture file. For example, the word "love" can correspond to a heart-shaped image file, the code "car" can correspond to the image file of the car, and the code 17 201248429 "motorcycle" can correspond to the image of the locomotive. When the word information found by the totem display unit 42 is the same as the word code in the text table correspondence table, the totem display unit 42 generates a picture link address corresponding to the word code, for example, the totem display unit 42 can be in the 15th picture. The word code information finds that the "car" and "motorcycle" are the same as the code in the text file correspondence table, and the totem display unit 42 generates the image link address h ttp://pic corresponding to the code "car". .apgamer.net/upload/car.jpg and the slot connection address corresponding to the word "motorcycle" http://pic.apgamer.net/upload/motor.jpg. Then, please refer to FIG. 16 at the same time. In step S42, the file change module 50 adds the style setting data corresponding to the custom label to the xml original file, and also associates the XML original file with the text file. The word code information with the same word code is replaced with the image link address to change the XML original file. It is worth noting that the order of substitution of words is sorted according to the length of the string in the word information' and is replaced by the longer priority of the string. Therefore, as shown in Fig. 17, the "car" in the code "motorcycle" Will not be replaced by the car's image file. In step S52, when the modified XML original file is interpreted, the file reader 60 downloads the image file according to the image link address, and interprets the style setting data and the image file to display the changed XML original. The style of the file sets the style and image of the data (as shown in Figure 17). The above embodiments are intended to illustrate the features of the present invention, and the purpose of the present invention is to enable those skilled in the art to understand the contents of the present invention and to clarify the scope of the invention, and not to limit the scope of the invention. Equivalent modifications or modifications made by the spirit of the disclosure should still be included in the scope of the claims described below. 201248429 [Simple Description of the Drawings] Fig. 1 is a block diagram of a system for applying a custom label to an XML file according to the first embodiment of the present invention. Figure 2 is a schematic diagram of a correspondence between a style setting data and a custom label according to an embodiment of the present invention. Figure 3 is a block diagram of a system for applying a custom tag to an XML file in accordance with a second embodiment of the present invention. Figure 4 is a block diagram of a system for applying a custom tag to an XML file in accordance with a third embodiment of the present invention. Fig. 5 is a flow chart showing a method of applying a custom tag to an XML file according to the first embodiment of the present invention. FIG. 6A is a schematic diagram of an XML original file including a custom tag search module according to an embodiment of the present invention. FIG. 6B is a schematic diagram of an XML original file according to an embodiment of the present invention. Fig. 7 is a schematic diagram showing the change of the XML original file in Fig. 6A. Figure 8 is a schematic diagram showing the contents of the XML original file of the file reader interpreting Fig. 6A. Figure 9 is a schematic diagram showing the contents of the XML original file after the modification of the file in the file reader. Figure 10A is a flow chart showing a method of applying a custom tag to an XML file according to a second embodiment of the present invention. Figure 10B is a flow chart of a method for generating a sub-set font file according to an embodiment of the present invention. 201248429 Figure 11 is a schematic diagram of the XML original file changed in Figure 6B. Fig. 12 is a schematic diagram showing the display contents of the XML original file after the modification of the file 11 by the file reader. Figure 13 is a flow chart showing a method of applying a custom tag to an XML file in accordance with a third embodiment of the present invention. Figure 14 is a schematic diagram of a text file correspondence table according to an embodiment of the present invention. Figure 15 is a schematic diagram of another XML original file according to an embodiment of the present invention. Fig. 16 is a schematic diagram showing the change of the XML original file in Fig. 15. Figure 17 is a schematic diagram showing the contents of the XML original file after the modification of the file reader is explained in Fig. 16. [Main component symbol description] 20................Custom label database 30................Custom label search module Group 40 ................custom label processing module 41 ........... font generation unit 42 .... ............totem display unit 50................file change module 60............. ...file reader 70................ font database 80........... totem database

Claims (1)

201248429 七、申請專利範圍: 1. 一種將自訂標籤應用於XML文件之方法,其包括下列步 驟: 提供一 XML原始文件,其中該XML原始文件包括至 少一自訂標籤; 搜尋該自訂標籤,其係藉由一自訂標籤搜尋模組搜尋 該XML原始文件中之該自訂標籤; 取得該自訂標籤之一樣式設定資料,其係藉由一自訂 標籤處理模組於一自訂標籤資料庫中取得該XML原始文 件中之該自訂標籤對應之該樣式設定資料;以及 變更該XML原始文件,其係藉由一文件變更模組根據 該樣式設定資料變更該XML原始文件。 2. 如申請專利範圍第1項所述之將自訂標籤應用於XML文件 之方法,其中該XML原始文件包括以HTML語法撰寫之 文件。 3. 如申請專利範圍第1項所述之將自訂標籤應用於XML文件 之方法,其進一步包括一顯示步驟,其係透過一文件閱讀 器解譯並顯示變更後之該XML原始文件。 4. 如申請專利範圍第1項所述之將自訂標籤應用於XML文件 之方法,其中該XML原始文件進一步包括至少一字碼資 訊;該自訂標籤處理模組進一步包括一字型產生單元;以 及該樣式設定資料進一步包括一字型資訊;其中該自訂標 籤搜尋模組於搜尋該自訂標籤時進一步搜尋該字碼資訊, 並將該字碼資訊傳送至該字型產生單元,該字型產生單元 21 201248429 又依據該字碼資訊及該字型資訊生成至少一子集合字型檔 案及其定址資訊,而該文件變更模組進一步加入該定址資 訊於該XML原始文件中以變更該XML原始文件。 5. 如申請專利範圍第4項所述之將自訂標籤應用於XML文件 之方法,其進一步包括一顯示步驟,其係透過一文件閱讀 器解譯並顯示變更後之該XML原始文件,其中該文件閱讀 器根據該定址資訊下載該子集合字型檔案,並由該文件閱 讀器對該樣式設定資料及該子集合字型檔案進行解譯,以 呈現該樣式設定資料之樣式及該子集合字型檔案之字型。 6. 如申請專利範圍第4項所述之將自訂標籤應用於XML文件 之方法,其中該字型產生單元生成該子集合字型檔案之步 驟包括: 接收該字碼資訊與該字型資訊; 從儲存於一字型資料庫之原始字型資料中尋找符合該 字型資訊要求之字型; 根據該字碼資訊與該原始字型資料中該字型資訊要求 之該字型相比對,以在該原始字型資料中取得該字碼資訊 中每一字碼對應之一字型圖像,並產生該字碼資訊與該字 型圖像間之索引表;以及 根據該索引表產生一文件閱讀器可識別之該子集合字 型檔案。 7. 如申請專利範圍第4項所述之將自訂標籤應用於XML文件 之方法,其中該定址資訊包括該子集合字型檔案之網路位 址0 22 201248429 8. 如申請專利範圍第1項所述之將自訂標籤應用於XML文件 之方法,其中該XML原始文件進一步包括至少一字碼資 訊;以及該自訂標籤處理模組進一步包括一圖騰顯示單 元;其中該自訂標籤搜尋模組於搜尋該自訂標籤時進一步 搜尋該字碼資訊,並將該字碼資訊傳送至該圖騰顯示單 元,該圖騰顯示單元又取得一文字圖檔對應表,其中該文 字圖檔對應表至少包括一字碼與一圖檔之對應關係,若該 圖騰顯示單元找到該XML原始文件中之該字碼資訊與該 文字圖檔對應表内之一該字碼相同,則據此產生一圖檔連 結位址,該文件變更模組又進一步將該XML原始文件中與 該字碼相同之該字碼資訊置換為該圖檔連結位址,以變更 該XML原始文件。 9. 如申請專利範圍第8項所述之將自訂標籤應用於XML文件 之方法,其進一步包括一顯示步驟,其係透過一文件閱讀 器解譯並顯示變更後之該XML原始文件,其中該文件閱讀 器根據該圖檔連結位址下載該圖檔,並由該文件閱讀器對 該樣式設定資料及該圖檔進行解譯,以呈現該樣式設定資 料之樣式及該圖檔。 10. 如申請專利範圍第8項所述之將自訂標籤應用於XML文件 之方法,其中該文字圖檔對應表係依一字串長度進行排 序,且以該字串長度較長的優先取代。 11. 一種將自訂標籤應用於XML文件之系統,其包括: 一自訂標籤資料庫,其係儲存有至少一自訂標籤對應之一 樣式設定資料; 23 201248429 之一該自訂 一自訂標籤搜尋模組,搜尋一 xml原始文件中 標籤; 一自訂標籤處理模組,其係於該自訂標籤資料庫中取得診 自訂標藏搜尋模組搜尋到的該自訂標籤對應之該樣式= 定資料;以及 Λ 一文件變更模組,其係根據自訂標籤處理模組輸出之該樣 式設定資料變更該XML原始文件。 12. 如申請專利範圍第11項所述之將自訂標籤應用於XML文 件之系統,其中該XML原始文件包括以HTML語法撰寫 之文件。 13. 如申請專利範圍第11項所述之將自訂標籤應用於XML文 件之系統,其進一步包括一文件閱讀器’其係解譯並顯示 變更後之該XML原始文件。 14. 如申請專利範圍第Η項所述之將自訂標籤應用於XML文 件之系統,其中該自訂標藏搜尋模組進—步搜尋該XML原 始文件並取得一字碼資訊,該樣式設定資料進一步包括〆 字型資訊,並且該自訂標籤處理模組進一步包括一字型裘 生單元,該字型產生單元係根據該字碼資訊及該字型資訊 生成至少一子集合字型檔案及其定址資訊。 15. 如申請專利範圍第14項所述之將自訂標籤應用於xml文 件之系統,其中該文件變更模組進一步加入該定址資訊以 變更該XML原始文件。 16. 如申請專利範圍第丨5項所述之將自訂標籤應用於χ M乙文 件之系統,其進一步包括一文件閱讀器,其係根據該定址 24 201248429 資訊下載該子集合字型檔案,並由該文件閱讀器對該樣式 設定資料及該子集合字型檔案進行解譯,以呈現該樣式設 定資料之樣式及該子集合字型檔案之字型。 17. 如申請專利範圍第14項所述之將自訂標籤應用於XML文 件之系統,其中該定址資訊包括該子集合字型檔案之網路 位址。 18. 如申請專利範圍第11項所述之將自訂標籤應用於XML文 件之系統,其中該自訂標籤搜尋模組於搜尋該自訂標籤時 進一步搜尋該XML原始文件中之一字碼資訊,且該自訂標 籤處理模組進一步包括一圖騰顯示單元,該圖騰顯示單元 係尋找該字碼資訊並與一文字圖檔對應表比對,當該圖騰 顯示單元找到之該字碼資訊與該文字圖檔對應表内之一字 碼相同,則據此產生一圖檔連結位址,其中該文字圖檔對 應表至少包括一該字碼與一圖樓之對應關係。 19. 如申請專利範圍第18項所述之將自訂標籤應用於XML文 件之系統,其中該文件變更模組進一步將該XML原始文件 中與該字碼相同之該字碼資訊置換為該圖檔連結位址,以 變更該XML原始文件。 20. 如申請專利範圍第19項所述之將自訂標籤應用於XML文 件之系統,其進一步包括一文件閱讀器,其係根據該圖檔 連結位址下載該圖檔,並由該文件閱讀器對該樣式設定資 料及該圖檔進行解譯,以呈現該樣式設定資料之樣式及該 圖檔。 21. 如申請專利範圍第11項所述之將自訂標籤應用於XML文 25 201248429 件之系統,其中該自訂標籤資料庫及該自訂標籤處理模組 係設置於一自訂標籤伺服器中,而該自訂標籤搜尋模組及 該文件變更模組則設置於一裝置中。 22.如申請專利範圍第11項所述之將自訂標籤應用於XML文 件之系統,其中該自訂標籤資料庫係設置於一自訂標籤伺 服器中,而該自訂標籤處理模組、該自訂標籤搜尋模組及 該文件變更模組則設置於一裝置中。 26201248429 VII. Patent Application Range: 1. A method for applying a custom label to an XML file, comprising the steps of: providing an XML original file, wherein the XML original file includes at least one custom label; searching for the custom label, Searching for the custom label in the XML original file by using a custom label search module; obtaining a style setting data of the custom label by using a custom label processing module on a custom label And obtaining, in the database, the style setting data corresponding to the custom label in the XML original file; and changing the XML original file, wherein the XML original file is changed according to the style setting data by a file changing module. 2. A method of applying a custom tag to an XML file as described in claim 1 of the patent application, wherein the XML original file comprises a file written in HTML syntax. 3. The method of applying a custom tag to an XML file as described in claim 1 further comprising a display step of interpreting and displaying the altered XML original file through a file reader. 4. The method of applying a custom tag to an XML file as described in claim 1, wherein the XML original file further comprises at least one word code information; the custom tag processing module further comprising a font generating unit; And the style setting data further includes a font type information; wherein the custom label search module further searches for the word information when searching for the custom label, and transmits the word information to the font generating unit, the font is generated The unit 21 201248429 further generates at least one sub-set font file and its addressing information according to the word information and the font information, and the file change module further adds the addressing information to the XML original file to change the XML original file. 5. The method of applying a custom tag to an XML file as described in claim 4, further comprising a display step of interpreting and displaying the changed XML original file through a file reader, wherein The file reader downloads the sub-set font file according to the address information, and the file reader interprets the style setting data and the sub-set font file to present the style and the subset of the style setting data. The font of the font file. 6. The method for applying a custom tag to an XML file as described in claim 4, wherein the step of generating, by the font generating unit, the sub-set font file comprises: receiving the word information and the font information; Searching for the font corresponding to the font information requirement from the original font data stored in the font database; and comparing the font information with the font required by the font information in the original font data, Obtaining, in the original font data, one font image corresponding to each word code in the word information, and generating an index table between the word information and the font image; and generating a file reader according to the index table Identify the sub-set font file. 7. The method for applying a custom label to an XML file as described in claim 4, wherein the addressing information includes a network address of the sub-set font file 0 22 201248429 8. The method for applying a custom tag to an XML file, wherein the XML original file further includes at least one word code information; and the custom tag processing module further includes a totem display unit; wherein the custom tag search module Searching for the custom tag, searching for the code information, and transmitting the code information to the totem display unit, the totem display unit further obtaining a text file correspondence table, wherein the text file correspondence table includes at least one character code and one Corresponding relationship between the file files, if the totem display unit finds that the word code information in the XML original file is the same as one of the word codes in the correspondence table of the text file, thereby generating a picture link address, the file change mode The group further replaces the code information in the XML original file with the same word code as the image link address to change the XML original text. . 9. The method of applying a custom tag to an XML file as described in claim 8 further comprising a display step of interpreting and displaying the altered XML original file through a file reader, wherein The file reader downloads the image file according to the image link address, and the file reader interprets the style setting data and the image file to present the style of the style setting data and the image file. 10. The method for applying a custom label to an XML file as described in claim 8 wherein the text file correspondence table is sorted according to a string length and replaced by a longer priority of the string. . 11. A system for applying a custom label to an XML file, comprising: a custom label database, wherein at least one custom label corresponds to one style setting data; 23 201248429 one of the custom ones The tag search module searches for a tag in an xml original file; a custom tag processing module that is associated with the custom tag searched by the custom tag search module in the custom tag database Style = fixed data; and 文件 a file change module, which changes the XML original file according to the style setting data output by the custom label processing module. 12. A system for applying a custom label to an XML file as described in claim 11 wherein the XML source file comprises a file written in HTML syntax. 13. The system for applying a custom tag to an XML file as described in claim 11 further comprising a file reader&apos; which interprets and displays the altered XML original file. 14. The system for applying a custom label to an XML file as described in the scope of the patent application, wherein the custom label search module further searches for the XML original file and obtains a word code information, the style setting data. Further comprising a font type information, and the custom label processing module further comprises a font type generating unit, wherein the font generating unit generates at least one subset font file and the address according to the word information and the font information. News. 15. The system for applying a custom tag to an xml file as described in claim 14 wherein the file change module further includes the addressing information to change the XML original file. 16. The system for applying a custom label to a file as described in claim 5, further comprising a file reader for downloading the subset font file according to the address 24 201248429 information. And the file setting device and the sub-set font file are interpreted by the file reader to present the style of the style setting data and the font of the sub-set font file. 17. The system for applying a custom tag to an XML file as described in claim 14 wherein the addressing information comprises a network address of the sub-set font file. 18. The system for applying a custom label to an XML file as described in claim 11, wherein the custom label search module further searches for one of the XML source files in the search for the custom label. The custom tag processing module further includes a totem display unit, wherein the totem display unit searches for the word information and compares it with a text file correspondence table, and the code information found by the totem display unit corresponds to the text file One of the words in the table has the same code, and accordingly, a picture link address is generated, wherein the text file correspondence table includes at least a correspondence between the code and a picture. 19. The system for applying a custom tag to an XML file as described in claim 18, wherein the file change module further replaces the code information in the XML original file with the same code as the image link. The address to change the XML original file. 20. The system for applying a custom tag to an XML file as described in claim 19, further comprising a file reader for downloading and reading the image file according to the image link address. The style setting data and the image file are interpreted to present the style of the style setting data and the image file. 21. The system for applying a custom label to an XML document 25 201248429, as described in claim 11, wherein the custom label database and the custom label processing module are disposed on a custom label server The custom tag search module and the file change module are disposed in a device. 22. The system for applying a custom tag to an XML file as described in claim 11, wherein the custom tag database is disposed in a custom tag server, and the custom tag processing module, The custom tag search module and the file change module are disposed in a device. 26
TW100118769A 2011-05-27 2011-05-27 Method for applying custom tags to XML document and the system thereof TW201248429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW100118769A TW201248429A (en) 2011-05-27 2011-05-27 Method for applying custom tags to XML document and the system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW100118769A TW201248429A (en) 2011-05-27 2011-05-27 Method for applying custom tags to XML document and the system thereof

Publications (1)

Publication Number Publication Date
TW201248429A true TW201248429A (en) 2012-12-01

Family

ID=48138731

Family Applications (1)

Application Number Title Priority Date Filing Date
TW100118769A TW201248429A (en) 2011-05-27 2011-05-27 Method for applying custom tags to XML document and the system thereof

Country Status (1)

Country Link
TW (1) TW201248429A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377371A (en) * 2019-07-23 2019-10-25 中信百信银行股份有限公司 A kind of style sheet method for managing system based on Web label

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377371A (en) * 2019-07-23 2019-10-25 中信百信银行股份有限公司 A kind of style sheet method for managing system based on Web label

Similar Documents

Publication Publication Date Title
JP5480892B2 (en) Advertisement presentation based on WEB page dialogue
US9047261B2 (en) Document editing method
US8769050B2 (en) Serving font files in varying formats based on user agent type
JP5551938B2 (en) Method and apparatus for providing information content to be displayed on a client device
US8042036B1 (en) Generation of a URL containing a beginning and an ending point of a selected mark-up language document portion
US20160283606A1 (en) Method for performing webpage loading, device and browser thereof
US20090019386A1 (en) Extraction and reapplication of design information to existing websites
US20120072831A1 (en) Method for creating a multi-lingual web page
US20090006471A1 (en) Exposing Specific Metadata in Digital Images
US20150227276A1 (en) Method and system for providing an interactive user guide on a webpage
US20110145299A1 (en) Offline Gadgets IDE
CN106951270B (en) Code processing method, system and server
US10013403B2 (en) Browsing system, terminal, image server, program, computer-readable recording medium storing program, and method
CN113360106B (en) Webpage printing method and device
CN114021042A (en) Webpage content extraction method and device, computer equipment and storage medium
CN101576885A (en) Technical scheme for extracting dynamic generation web page contents
JP2008071116A (en) Information delivery system, information delivery device, information delivery method and information delivery program
TW201248429A (en) Method for applying custom tags to XML document and the system thereof
US20080040658A1 (en) Linking of Content Portions Developed Independently
JP2009157797A (en) Data input support system, data input support method and program
JP2000222326A (en) Learning supporting method and its system and storage medium for storing learning supporting program
JP2002251338A (en) Document display device having bookmark presenting function
TWI427534B (en) Method for producing illustration of web page by illustration server
JP2009104595A (en) Web page connection system and method
JP4337309B2 (en) Browser device