XML processor having function for filtering tree path, method of filtering tree path and recording medium storing a program to implement the method

Shin, Seong-kook ;   et al.

Patent Application Summary

U.S. patent application number 11/097084 was filed with the patent office on 2005-10-06 for xml processor having function for filtering tree path, method of filtering tree path and recording medium storing a program to implement the method. This patent application is currently assigned to SAMSUNG ELECTRONICS CO., LTD.. Invention is credited to Choi, Hyok-sung, Shin, Seong-kook.

Application Number20050223017 11/097084
Document ID /
Family ID36139457
Filed Date2005-10-06

United States Patent Application 20050223017
Kind Code A1
Shin, Seong-kook ;   et al. October 6, 2005

XML processor having function for filtering tree path, method of filtering tree path and recording medium storing a program to implement the method

Abstract

An extensible markup language (XML) processor having a function for filtering a tree path for an XML based document so that a tree structure can be built by using necessary elements among elements included in the XML based document, a tree path filtering method and a recording medium storing a program to implement the method are provided. The method includes: detecting a tree path satisfying a predetermined tree path policy from a document; and building a tree structure corresponding to the document by using the detected tree path.


Inventors: Shin, Seong-kook; (Seoul, KR) ; Choi, Hyok-sung; (Anyung-si, KR)
Correspondence Address:
    SUGHRUE MION, PLLC
    2100 PENNSYLVANIA AVENUE, N.W.
    SUITE 800
    WASHINGTON
    DC
    20037
    US
Assignee: SAMSUNG ELECTRONICS CO., LTD.

Family ID: 36139457
Appl. No.: 11/097084
Filed: April 4, 2005

Related U.S. Patent Documents

Application Number Filing Date Patent Number
60558549 Apr 2, 2004

Current U.S. Class: 1/1 ; 707/999.1
Current CPC Class: G06F 40/154 20200101; G06F 16/40 20190101; G06F 40/221 20200101; G06F 16/51 20190101; G06F 40/143 20200101; Y10S 707/99931 20130101
Class at Publication: 707/100
International Class: G06F 007/00

Foreign Application Data

Date Code Application Number
Sep 18, 2004 KR 10-2004-0074822

Claims



What is claimed is:

1. A method of filtering a tree path of an input document, the method comprising: detecting a tree path satisfying a predetermined tree path policy from the document; and building a tree structure corresponding to the document by using the detected tree path.

2. The method of claim 1, wherein the tree path policy includes information on an element to be included in the tree structure as tree path information.

3. The method of claim 2, wherein the tree path information is described as any one of a character string in which a term and a stem are described between symbols distinguishing elements, a character string which is described in order of the term, the stem and the symbol, a character string which is described in order of the symbol, the term, and the stem, and a character string described in order of the term and the stem.

4. The method of claim 2, wherein the detecting of the tree path comprises: parsing the document in units of tree paths or elements; determining whether or not data identical to the tree path or element obtained by the parsing is included in the tree path information; if the tree path or element obtained by the parsing is included in the tree path information, detecting the tree path or element as satisfying the tree path policy; and if the tree path or element obtained by the parsing is not included in the tree path information, ignoring the tree path or element.

5. The method of claim 1, wherein the document is an extensible markup language-based document, and the method is operated by a processor parsing the XML based document.

6. A processor having a function for filtering a tree path in an input document, comprising: a parser parsing the document and filtering a tree path of necessary data among the parsed data; a tree path policy storing unit storing information on a predetermined tree path policy; and an information providing unit referring to information stored in the tree path policy storing unit and if data parsed in the parser satisfies the predetermined tree path policy, providing information indicating that the parsed data is necessary data to the parser.

7. The processor of claim 6, wherein the parser parses the document in units of tree paths or elements.

8. The processor of claim 6, wherein the parser detects necessary data among the parsed data based on the information provided by the information providing unit, indicating that the parsed data is necessary data, and builds a tree structure corresponding to the document by using the detected data.

9. The processor of claim 8, wherein the information on the predetermined tree path policy defines an element to be included in the tree structure as tree path information.

10. The processor of claim 9, wherein the tree path information is described as any one of a character string in which a term and a stem are described between symbols distinguishing elements, a character string which is described in order of the term, the stem and the symbol, a character string which is described in order of the symbol, the term, and the stem, and a character string described in order of the term and the stem.

11. The processor of claim 9, wherein if the parsed data is included in the tree path information defined in the tree path policy, the information providing unit determines that the parsed data satisfies the tree path policy.

12. The processor of claim 11, wherein the information providing unit comprises a comparison unit comparing the parsed data with the tree path information defined in the tree path policy.

13. The processor of claim 6, wherein the document is an XML-based document.

14. A computer readable recording medium having embodied thereon a computer program to perform a method of filtering a tree path in an input document, the method comprising: detecting a tree path satisfying a predetermined tree path policy from the document; and building a tree structure corresponding to the document by using the detected tree path.
Description



CROSS-REFERENCE TO RELATED PATENT APPLICATIONS

[0001] This application claims the priority of Korean Patent Application No. 10-2004-0074822, filed on Sep. 18, 2004, in the Korean Intellectual Property Office, and U.S. Provisional Patent Application No. 60/558,549, filed on Apr. 2, 2004, in the U.S. Patent and Trademark Office, the disclosures of which are incorporated herein in their entirety by reference.

BACKGROUND OF THE INVENTION

[0002] 1. Field of the Invention

[0003] The present invention relates to a tree path filtering, and more particularly, to an extensible markup language (XML) processor having a tree path filtering function, a tree path filtering method and a recording medium storing a program to implement the method.

[0004] 2. Description of the Related Art

[0005] An XML processor parses an XML based document and is classified into a stream-based XML processor and a tree-based XML processor. The stream-based XML processor reads characters one by one in a stream and parses an XML based document sequentially. Since the stream-based XML processor does not store information while parsing an XML document, it does not need a large amount of memory space. However, since an operator has to personally store necessary information, the operator is burdened with lots of works to do. Generally, when an XML document is designed in a simple format and has a relatively big size, and the memory capacity of a system is small, the stream-based XML processor is used.

[0006] The tree-based XML processor parses an XML based document as one of a stream, a buffer, and a file, and builds a tree-like structure corresponding to the XML document in a memory. That is, all elements included in the XML document are stored in the memory. These elements include attributes or metadata.

[0007] For example, if an XML document is an XML based MultiPhotoVideo (MPV) document as shown in FIG. 1, the tree based XML processor builds a tree structure, as shown in FIG. 2, in a memory. Generally, when an XML document is very complicated, has a relatively small size, and has internal cross references and the memory capacity of a system is big, the tree-based XML processor is used.

[0008] In the tree-based XML processor, since all elements are stored in a memory, unnecessary elements can be stored in the memory. For example, in case of an MP3 player, if the MP3 player can reproduce only audio signals but an input XML document includes a "still" element in addition to an "audio" element, the "still" element is also stored in the memory disposed in the MP3 player.

[0009] However, as described above, since the MP3 player can reproduce only audio signals, the elements stored in the memory, except the elements related to audio signals, become information that is not used. Accordingly, when the tree-based XML processor is used, the memory capacity can be consumed unnecessarily.

SUMMARY OF THE INVENTION

[0010] The present invention provides an extensible markup language (XML) processor having a function filtering a tree path for an XML based document so that a tree structure can be built by using necessary elements among elements included in the XML based document, a tree path filtering method and a recording medium storing a program to implement the method.

[0011] According to an aspect of the present invention, there is provided a tree path filtering method for filtering a tree path of an input document, the method comprising: detecting a tree path satisfying a predetermined tree path policy from the document; and building a tree structure corresponding to the document by using the detected tree path.

[0012] The tree path policy may define an element to be included in the tree structure as tree path information.

[0013] The tree path information may be described as any one of a character string in which a term and a stem are described between symbols distinguishing elements, a character string which is described in order of the term, the stem and the symbol, a character string which is described in order of the symbol, the term, and the stem, and a character string described in order of the term and the stem.

[0014] The detecting of the tree path may include: parsing the document in units of tree paths or elements; determining whether or not data identical to the tree path or element obtained by the parsing is included in the tree path information; if the tree path or element obtained by the parsing is included in the tree path information, detecting the tree path or element as satisfying the tree path policy; and if the tree path or element obtained by the parsing is not included in the tree path information, ignoring the tree path or element.

[0015] The document may be an extensible markup language based document, and the method is operated by a processor parsing the XML based document.

[0016] According to another aspect of the present invention, there is provided a processor having a function for filtering a tree path in an input document, including: a parser parsing the document and filtering a tree path of necessary data among the parsed data; a tree path policy storing unit storing information on a predetermined tree path policy; and an information providing unit referring to information stored in the tree path policy storing unit and if data parsed in the parser satisfies the predetermined tree path policy, providing information indicating that the parsed data is necessary data to the parser.

[0017] The parser may detect necessary data among the parsed data based on the information provided by the information providing unit, indicating that the parsed data is necessary data, and build a tree structure corresponding to the document by using the detected data.

[0018] The tree path information may be described as any one of a character string in which a term and a stem are described between symbols distinguishing elements, a character string which is described in order of the term, the stem and the symbol, a character string which is described in order of the symbol, the term, and the stem, and a character string described in order of the term and the stem.

[0019] If the parsed data is included in the tree path information defined in the tree path policy, the information providing unit may determine that the parsed data satisfies the tree path policy.

[0020] The information providing unit may include: a comparison unit comparing the parsed data with the tree path information defined in the tree path policy.

[0021] According to still another aspect of the present invention, there is provided a computer readable recording medium having embodied thereon a computer program to perform a method for filtering a tree path in an input document, wherein the tree path filtering method may include: detecting in the document a tree path based on a tree path or element satisfying a predetermined tree path policy; and by using the detected tree path, building a tree structure corresponding to the document.

BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:

[0023] FIG. 1 illustrates an example of an XML based MultiPhotoVideo (MPV) document;

[0024] FIG. 2 is a tree view corresponding to the MPV document shown in FIG. 1;

[0025] FIG. 3 is a functional block diagram of a system including an XML processor according to an embodiment of the present invention;

[0026] FIG. 4 illustrates an example of a tree view obtained by an XML processor according to an embodiment of the present invention; and

[0027] FIG. 5 is a flowchart of the operations performed by a tree path filtering method according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

[0028] The present invention will now be described more fully with reference to the accompanying drawings, in which exemplary embodiments of the invention are shown.

[0029] Referring to FIG. 3, a system including an XML processor according to an exemplary embodiment of the present invention has an XML processor 300 and a memory 310. The system is an apparatus capable of using an XML based document, such as a computer system and a DVD player.

[0030] The XML processor 300 parses an XML document being input, filters a tree path of the XML document and builds a tree structure for the input XML document in the memory 310. For this, the XML processor 300 has an XML parser 301, a comparison unit 302, and a tree path policy storing unit 303.

[0031] An XML document is an XML based document. The XML parser 301 parses the XML document if the XML document is input, and detects XML data in units of tree paths. For example, when XML data is detected in units of tree paths in FIG. 2, the XML parser 301 detects ".vertline.mpv:still.ver- tline.nmf:metadata .vertline.dc:Properties.vertline.dc:creator.vertline.se- oung-kook shin.vertline."0 as one tree path, detects ".vertline.mpv:still.vertline.nmf:Metadata.vertline.dc:Properties.vertlin- e.dc:title.vertline.central Park.vertline." as one tree path, ".vertline.mpv:still.vertline.nmf:Metadata.vertline.dcterms:Properties.ve- rtline.dcterms:created.vertline.2004-03-14T . . . .vertline." as one tree path, and ".vertline.mpv:still.vertline.mpv:LastURL .vertline.STILL001.JPG.vertline." as one tree path.

[0032] The thus detected XML data is transmitted to the comparison unit 302. If a signal from the comparison unit 302 indicating that the detected XML data is necessary data is input, the XML parser 301 builds a tree structure including the detected XML data in the memory 310. However, if a signal from the comparison unit 302 indicating that the detected XML data is unnecessary data is input, the XML parser 301 ignores the detected XML data and detects XML data (or XML tree path) next to the detected XML data in the XML document and repeats the process described above.

[0033] If XML data is input from the XML parser 301, the comparison unit 302 compares it with XML data stored in the tree path policy storing unit 303 and determines whether or not the input XML data satisfies the tree path policy. That is, if there is data corresponding to the tree path policy information in the input XML data, the comparison unit 302 determines that the input XML data satisfies the tree path policy, and provides a signal indicating that the detected XML data is necessary data, to the XML parser 301. For example, if the input XML data is ".vertline.mpv:still.vertline.nmf:Metadata.vertline.dc:Properties.vertlin- e.dc:title.vertline.central Park.vertline." and tree path policy information is "*.vertline.dc:title.vertline.*", the comparison unit provides a signal indicating that the input XML data is necessary data, to the XML parser 301.

[0034] However, if there is no data corresponding to the tree path policy information in the input XML data, the comparison unit 302 determines that the input XML data does not satisfy the tree path policy and provides a signal indicating that the detected XML data is unnecessary data, to the XML parser 301. For example, if the input XML data is ".vertline.mpv:still.vertline.nmf:metadata.vertline.dc:Properties .vertline.dc:creator.vertline.seoung-kook shin.vertline." and tree path policy information is "*.vertline.dc:title.vertline.*", the comparison unit provides a signal indicating that the input XML data is unnecessary data, to the XML parser 301.

[0035] Accordingly, the comparison unit 302 can be defined as an information providing unit providing information obtained by determining whether or not the input XML data satisfies the tree path policy.

[0036] Thus, the XML data provided by the XML parser 301 and the XML data stored in the tree path policy storing unit 303 can have a tree path format. For example, if an XML document is an MPV file as shown in FIG. 1 and only<dc:title>metadata is needed, tree path policy information stored in the tree path policy storing unit 303 can be defined as tree path information such as at least "*.vertline.dc:title.vertline.*". The tree path policy information can be defined as tree path information including <dc:title>element such as ".vertline.mpv:still.vertline.n- mf:Metadata.vertline.dc:Properties.vertline.dc:title.vertline.central Park.vertline." and "*.vertline.dc:title.vertline.*".

[0037] When the XML parser 301 parses the XML data in units of elements and provides the parsed data to the comparison unit 302, XML data provided by the XML parser 301 does not have a tree path format, but the tree path policy storing unit 303 has a tree path format as described above. In this case, the comparison unit 302 performs a comparison to determine whether or not in element information stored in the tree path policy storing unit 303 there is information identical to the parsed XML data, and based on the comparison result, provides a signal indicating whether or not the parsed XML data is necessary, to the XML parser 301.

[0038] If the tree path information stored in the tree path policy storing unit 303 is "*.vertline.dc:title.vertline.*", tree paths, excluding the tree paths including "dc:title" element, are regarded as unnecessary tree paths by the comparison unit 302. Accordingly, a tree structure built by the XML parser 301 in the memory 301 is as shown in FIG. 4.

[0039] Tree path policy information stored in the tree path policy storing unit 303 can be defined based on XML tree path information as shown in Table 1:

1TABLE 1 XML tree path information Definition .vertline.aa.vertline.bb{3-}.vertline. "aa" is a root element. The first and second "bb" name child elements included in "aa" root element are ignored and the third "bb" name child element is indicated. .vertline.a:b.vertline.a:c.vertline. A "c" name child element of a "b" element having "a" as a prefix of the name space is indicated. "a:b" is a root element. .vertline.aa.vertline.*{3}.vertline. The third child element of "aa" element is indicated and that the name of an element is not important is indicated. "aa" is a root element. .vertline.a.vertline.*.vertline. All child elements of "a" element are indicated and "a" is a root element. The name of a child element is not important. For example, .vertline.a.vertline.b.vertline., .vertline.a.vertline.d.vertline.and.vertline.a.vertline.any.vertline.are allowable but .vertline.a.vertline.b.vertline.c.vertline. is not. .vertline.a.vertline.* All descendant elements of "a" element are indicated. "a" is a root element. All child elements having "a" element as a direct or indirect ancestor are indicated in addition to direct child elements of "a" element. .vertline.*:a.vertline.*:b{2}.vertline.* "a" is a root element and the name of a prefix is not important. All child elements of the second "b" name child element of "a" element are indicated. *.vertline.a.vertline.b.vertline. Elements having a direct parent with name "a" and having "b" as a first node are indicated. The parent of "a" element is not important. a.vertline.b.vertline. Elements as child elements of a first "a" element that is the child of an arbitrary base element and having "b" as the first node name are indicated. . . .

[0040] Also, tree path policy information stored in the tree path policy storing unit 303 can be defined by considering the function of a system. For example, in case where the system is an MP3 player, the tree path policy information can be defined as XML data having tree path information related to audio. For example, tree path policy information including an audio element such as "*.vertline.*:audio.vertline.*" can be defined.

[0041] Thus, the tree path policy may define an element to be included in the tree to be built as tree path information. The element can include an attribute and can be regarded as one node in the tree structure. The tree path information form can be described as any one of a character string in which a term and a stem are described between symbols distinguishing elements (.vertline.term stem.vertline.), a character string which is described in order of a term, a stem and the symbol (term stem.vertline.), a character string which is described in order of the symbol, a term and a stem (.vertline.term stem), and a character string which is described in order of a term and a stem.

[0042] The memory 310 stores an XML document having a tree structure based on the XML data filtered by the XML parser 301.

[0043] FIG. 5 is a flowchart of the operations performed by a tree path filtering method according to an exemplary embodiment of the present invention. An XML document is parsed in units of tree paths or elements as described with reference to FIG. 3 in operation 501. It is determined whether or not the XML data parsed in units of tree paths or elements satisfies a tree path policy set in advance in operation 502. That is, if the tree path policy information set in advance includes data (or a character string) identical to XML data for one tree path or element parsed and detected, it is determined that the XML data for the one tree path or element satisfies the tree path policy set in advance.

[0044] If the XML data for one tree path or element satisfies the tree path policy, the XML data for the tree path or element is detected as a tree path or element to be used when a tree structure corresponding to the XML data is built in operation 503. If XML data of all tree paths or elements included in the XML document are checked with respect to whether or not the tree path policy is satisfied in operation 504, a tree path for the XML document is built by using XML data for the detected tree path or element in operation 505.

[0045] However, if among tree paths or elements included in the XML document there are tree paths or elements not checked with respect to whether or not the tree path policy is satisfied, processing returns to operation 502 and the process described above is repeatedly performed for a tree path or element parsed next.

[0046] If the XML data parsed in units of tree paths or elements does not satisfy the tree path policy, the XML data is not detected such that when a tree structure corresponding to the XML document is built, the XML data in units of tree paths or elements is not used in operation 506. That is, the XML data parsed in units of tree paths or elements is processed such that the XML data is ignored when the tree structure is built. Then, operation 504 is performed and the process described above is repeatedly performed.

[0047] FIG. 5 shows an example in which after all XML data of an input document are checked with respect to whether or not a tree path policy is satisfied, a tree structure corresponding to the input document is built. However, the tree path filtering method can also be implemented such that whenever XML data satisfying a tree path policy is detected, the tree structure is built.

[0048] A program for performing a method of filtering a tree path when a tree structure corresponding to an XML document is built in a tree-based XML processor as described above can also be embodied as computer readable codes on a computer readable recording medium. The computer readable recording medium is any data storage device that can store data which can be thereafter read by a computer system. Examples of the computer readable recording medium include read-only memory (ROM), random-access memory (RAM), CD-ROMs, magnetic tapes, floppy disks, optical data storage devices, and carrier waves (such as data transmission through the Internet).

[0049] The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion. Also, functional programs, codes, and code segments for accomplishing the present invention can be easily construed by programmers skilled in the art to which the present invention pertains.

[0050] In the present invention as described above, when a tree structure corresponding to an XML document is built in a tree-based XML processor, a tree path is filtered based on tree path policy information defined in advance and based on the filtered tree path, the tree structure is built such that unnecessary use of the memory capacity can be prevented. Accordingly, even in a system having a smaller memory capacity, a tree-based XML processor can be used.

[0051] While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it will be understood by those of ordinary skill in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention as defined by the following claims.

* * * * *


uspto.report is an independent third-party trademark research tool that is not affiliated, endorsed, or sponsored by the United States Patent and Trademark Office (USPTO) or any other governmental organization. The information provided by uspto.report is based on publicly available data at the time of writing and is intended for informational purposes only.

While we strive to provide accurate and up-to-date information, we do not guarantee the accuracy, completeness, reliability, or suitability of the information displayed on this site. The use of this site is at your own risk. Any reliance you place on such information is therefore strictly at your own risk.

All official trademark data, including owner information, should be verified by visiting the official USPTO website at www.uspto.gov. This site is not intended to replace professional legal advice and should not be used as a substitute for consulting with a legal professional who is knowledgeable about trademark law.

© 2024 USPTO.report | Privacy Policy | Resources | RSS Feed of Trademarks | Trademark Filings Twitter Feed