CN102073662B - Method and system for analyzing and creating XML (Extensible Markup Language) data - Google Patents

Method and system for analyzing and creating XML (Extensible Markup Language) data Download PDF

Info

Publication number
CN102073662B
CN102073662B CN200910238244.2A CN200910238244A CN102073662B CN 102073662 B CN102073662 B CN 102073662B CN 200910238244 A CN200910238244 A CN 200910238244A CN 102073662 B CN102073662 B CN 102073662B
Authority
CN
China
Prior art keywords
xml
mapping relations
subclass
version
organization definition
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN200910238244.2A
Other languages
Chinese (zh)
Other versions
CN102073662A (en
Inventor
王晓磊
张磊
王毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Founder Holdings Development Co ltd
Peking University Founder Research and Development Center
Original Assignee
BEIDA FANGZHENG TECHN INST Co Ltd BEIJING
Peking University Founder Group Co Ltd
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 BEIDA FANGZHENG TECHN INST Co Ltd BEIJING, Peking University Founder Group Co Ltd filed Critical BEIDA FANGZHENG TECHN INST Co Ltd BEIJING
Priority to CN200910238244.2A priority Critical patent/CN102073662B/en
Publication of CN102073662A publication Critical patent/CN102073662A/en
Application granted granted Critical
Publication of CN102073662B publication Critical patent/CN102073662B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

The invention provides a method and system for analyzing and creating XML (Extensible Markup Language) data in an XML file with multiple versions and subsets. The method comprises the steps of: defining a version range and a subset range of the XML file format and a mapping relation set between an XML structure and a program object model; dynamically creating XML structure defined metadata according to the mapping relationship set and the version identification and the subset identification of the current processed XML file; and completing the mutual conversion of the XML data and the program object model according to the XML structure defined metadata. Correspondingly, the invention also provides a system for analyzing and creating the XML data. By using the mapping relationship set, the XML structure defined metadata according with the multiple versions and the subsets is created, therefore, the XML structure defined redundant data is removed, the computer resource is saved, the modification and the maintenance of the application program are simplified; meanwhile, different XML files in the same version and the subset can share one XML structure defined metadata.

Description

A kind of method and system of resolving and creating the XML data
Technical field
The present invention relates to the XML data processing field, relate in particular to a kind of method and system of resolving and creating the XML data in the XML document with multiple version and subclass.
Background technology
XML (extend markup language) is widely used in aspects such as Web Service, exchanges data and language exchange as a kind of cross-platform normal data DIF, is the strong instrument of current Processing Structure document information.Based on some application of XML (such as, electronic document is handled, the internet) in, have the notion of " version " and " subclass ".For example; In processing to electronic document; Usually need be in an application program document format of compatible multiple version and subclass, such as, Microsoft Word 2003 can handle the document of multiple Version Specs such as Word 97, Word 2000 and Word 2003 simultaneously.Again for example, network browser program can be handled the webpage of multiple subclass standards such as XHTML 1.0 Strict, XHTML 1.0 Transitional and XHTML 1.0 Frameset simultaneously.
In such XML uses, with regard to the parsing and the establishment of XML data, require that application program can the XML data-switching of textural difference is arranged be the program object model with multiple, be the multiple XML data that textural difference is arranged perhaps with the program object model conversion.
Present known XML data generally have following two kinds with conversion method between the program object model: first kind of conversion method is that conversion logic is combined with the program object model; Conversion logic is created by manual work or machine; The general direct processing XML data of procedural model; Wherein, the existing representative technology of the method for machine establishment conversion logic has JAXB and XMLBeans; Second kind of conversion method is with conversion logic and program object model separation; Is the XML organization definition a kind of metadata; Use unspecific method processing XML data; And according to the metadata completion XML data of definition and the mutual conversion of program object model, representational prior art has Hibernate and Castor.
Existing these conversion methods have significant limitation for the XML document with multiple version and subclass.Particularly,, need artificially to handle respectively, be difficult to realize and maintenance to everywhere XML structural change in the different editions of document format and the subclass for the method for manual creation conversion logic.For the method for machine establishment conversion logic, all be to generate a cover program object model to a kind of XML organization definition, can't handle multiple XML organization definition simultaneously.And for second kind of conversion method; Need to each XML structure; Definition one cover XML organization definition metadata; Caused the waste of program resource like this, and between the multiple metadata bulk redundancy part has been arranged, the XML document with multiple version and subclass is made amendment and needed a plurality of XML organization definition of synchronous processing metadata when safeguarding.
For example; In the applying date is No. 200510127039.0 Chinese patent " be used for change between object model and xml shared with two way method and system " on November 29th, 2005; Use meta-model to come the description object model and in this model different objects how to be associated each other, and utilize a plurality of translaters to define the mapping relations between the architectural feature of each XML tag name and the meta-model that is associated.By this method, can use several different mechanism for resolving to be written into same object model from same XML file.But the mapping between the architectural feature of each XML label and meta-model is a basic fixed, when each XML label construction or object model structure change, needs to change meta-model and realizes shining upon with the translater class.Such as, for the electronic document of multiple version, an XML structural element comprises different attributes probably; According to this method; Need to each documentation release, change in the meta-model architectural feature and with the mapping relations of translater, possibly also need increase translater and realize mapping.That is to say that for different XML structures, need define meta-model and corresponding translater thereof again, its corresponding XML structural elements data also change.Therefore; Such metadata belongs to a kind of XML organization definition metadata of static state; Can not be applicable to the application of using XML document well, be embodied in multiple version and subclass, relatively more difficult to the modification and the maintenance of such XML document; Application program realizes that logic is complicated, and can not share same XML organization definition metadata between the different XML documents of same version and subclass.
Summary of the invention
In order to solve the problem in above second kind of conversion method; The present invention provides a kind of method and system of resolving and creating the XML data in the XML document with multiple version and subclass; To remove the redundant data of XML organization definition; Save computer resource, simplify modification and the maintenance of application program, and make and between the different XML documents of same version and subclass, can share a XML organization definition metadata XML document.
In order to realize above purpose, the method for XML data parsing provided by the invention and establishment may further comprise the steps: the version scope of definition XML document form and the set of the mapping relations between subset range, XML structure and the program object model; Version identifier and the subclass of gathering and work as the XML document of pre-treatment according to said mapping relations identify dynamic creation XML organization definition metadata; Accomplish the mutual conversion of XML data and program object model according to said XML organization definition metadata.
In said mapping relations set, an element, the one or more elements in the program object model and the version scope of XML document form and the corresponding relation of subset range in each bar mapping relations definition XML structure.
In said mapping relations set; The version scope and the subset range of XML document form are options; If a undefined version scope of mapping relations and a subset range are then used the corresponding definition of the XML structural element in father's mapping relations of these mapping relations in the said mapping relations set.
The step of said dynamic creation XML organization definition metadata also can comprise the step that the XML organization definition metadata of creating is added buffer memory.In this case, the step of said dynamic creation XML organization definition metadata may further comprise the steps: in XML organization definition metadata cache, search version identifier and subclass sign when the XML document of pre-treatment; If in XML organization definition metadata cache, do not find said sign; Then the XML structure root node of definition begins to travel through the mapping relations set from said mapping relations set; Wherein, For each the bar mapping relations that traverses, carry out following steps: judge in whether the version identifier of the XML document of pre-treatment and subclass identify the version scope and subset range in these mapping relations; Be positioned at said scope if work as the version identifier and the subclass sign of the XML document of pre-treatment, the mode of then adding in the XML organization definition metadata through the corresponding relation with XML structural element that defines in these mapping relations and program object model element is created XML organization definition metadata; Identify not in said scope if work as the version identifier and the subclass of the XML document of pre-treatment, then continue to travel through mapping relations downwards and gather; XML organization definition metadata with dynamic creation after having traveled through adds buffer memory.
Correspondingly, comprise according to the system that is used to resolve and create the XML data provided by the invention: the sign acquiring unit, the version identifier that obtains when the XML document of pre-treatment identifies with subclass; The XML data processing unit; The version scope of definition XML document form and the set of the mapping relations between subset range, XML structure and the program object model; Identify dynamic creation XML organization definition metadata according to the set of said mapping relations and version identifier and the subclass obtained through the sign acquiring unit, and according to the mutual conversion of said XML organization definition metadata completion XML data and program object model.
Said XML data processing unit comprises: create the unit, define said mapping relations set, and identify dynamic creation XML organization definition metadata according to said mapping relations set and version identifier and the subclass obtained through the sign acquiring unit; Converting unit is accomplished the mutual conversion of XML data and program object model according to said XML organization definition metadata.
Said XML data processing unit also can comprise buffer unit, is used for buffer memory through creating the XML organization definition metadata that the unit is created.
For XML organization definition metadata static in the prior art; The present invention uses an XML structure mapping set of relationship; Just can create out the XML organization definition metadata of the XML document form that meets multiple version and subclass; Do not have redundant XML organization definition, saved, simplified modification and the maintenance of application program simultaneously XML document to the taking of computer resource; And the required XML organization definition of dynamic creation metadata when the processing XML data makes application program can use the multiple version and the subclass of unified method processing XML document format, has reduced the implementation complexity of application program.
On the other hand; XML organization definition metadata through with dynamic creation adds buffer memory; Can make and between XML document, share a XML organization definition metadata with version identifier of the same race and subclass identifier combination; For the XML organization definition metadata of the static state of using in the prior art, XML organization definition metadata cache only accounts for very little extra computation machine resource consumption.
Description of drawings
Fig. 1 be in the electronic document XML organization definition and documentation release concern example;
Fig. 2 be in the electronic document XML organization definition and document subclass concern example;
Fig. 3 is the example according to the XML structure mapping set of relationship of the embodiment of the invention;
Fig. 4 A and Fig. 4 B are the process flow diagram according to the method for the parsing of the embodiment of the invention and establishment XML data;
Fig. 5 A and Fig. 5 B are the synoptic diagram for a specific electronic file form version identifier and subclass sign dynamic creation XML organization definition metadata;
Fig. 6 is the block diagram according to the system of the XML data that are used for resolving and create the XML document with multiple version and subclass of the present invention.
Embodiment
The present invention is applicable to the application based on the XML document with multiple version and subclass, and its main technical schemes comprises: at first, and the version scope of definition XML document form and the set of the mapping relations between subset range, XML structure and the program object model three; Then, identify dynamic creation XML organization definition metadata according to the set of said mapping relations with when the version identifier and the subclass of the XML document of pre-treatment; At last; Accomplishing the mutual conversion of XML data and program object model according to said XML organization definition metadata, specifically, is program object model and from the multiple XML data with textural difference of program object model creation according to said XML organization definition metadata with multiple XML data parsing with textural difference; The concrete disposal route of this step is by the employed XML disposal route decision of application program; Belong to prior art, therefore, the descriptions thereof are omitted in this manual.
To combine accompanying drawing and embodiment that the present invention is elaborated below.In following examples, explain according to parsing of the present invention and create the method and system of the XML data in such XML document as the example that is applied as of XML document with multiple version and subclass with electronic document.
For using the situation of XML in the electronic document as the data representation mode; " version " and " subclass " these two notions are embodied in the influence of XML organization definition: between the different document format versions; The organization definition of XML (comprising node, attribute, text data) has increase, deletion; For the compatibility that keeps down, generally do not have the modification of conflict; Between the different subclass of same document format version, the organization definition of XML does not have mutual conflict, and the structure that occurs in all subclass is included among the complete or collected works.Fig. 1 and Fig. 2 illustrate the example that concerns of XML organization definition and documentation release and document subclass in the electronic document respectively.
As shown in Figure 1, in the different editions of electronic file form standard, XML root node 101 has comprised all different child nodes set; In 1 definition of the version the earliest shown in 102, comprise 3 node; In the definition of the version 2 shown in 103, except comprising 3 all in 102 node, increased by 1 node; In the definition of the version 3 shown in 104, deleted 1 child node that in 102 and 103, all comprises, comprised other 3 node in 103, and increased by 2 node.
As shown in Figure 2, to concentrate in the different sub of electronic file form standard, XML root node 201 has comprised all different child nodes set; Shown in 202 is that complete or collected works define, and comprises 6 all node; 203, two different sub shown in 204 concentrate, and respectively comprise 4 each child node, but all do not exceed complete or collected works 202 scope, and 203,204 child nodes that comprised have overlappingly, have 1 node not comprised by 203 and 204 in 202.
In embodiments of the present invention, the concrete definition of said mapping relations set is following:
Each bar mapping relations has defined element and the corresponding relation of the one or more elements in the program object model in the XML structure;
Each bar mapping relations has also defined element and the version scope of electronic file form and the corresponding relation of subset range in the XML structure; The implication of this corresponding relation is; Document format definition for any particular version and subclass; If this version and subclass are included within the version scope and subset range in these mapping relations, then in this specific document format definition, there is the XML structural element in these mapping relations;
The version scope of electronic file form and subset range are options in each bar mapping relations; If a undefined version scope of mapping relations and a subset range are then used the corresponding definition of the XML structural element in father's mapping relations of these mapping relations in the said mapping relations set;
Structural relation between structural each XML structural element of dependency information reflection between the mapping relations.
Below will be with reference to the XML structure mapping set of relationship of figure 3 detailed descriptions according to the embodiment of the invention.
With reference to Fig. 3, label 301-306 representes 6 XML structure mapping relations respectively.With mapping relations 301 is example, and in these mapping relations, the XML structure is < Root>node, and electronic document version scope is version 1-5, and the electronic file form subset range is all subclass, and corresponding program object model is program object R.The following relation of this mapping relations reflection: XML node < Root>has definition in all subclass of the version 1-5 of electronic file form standard; When the analyzing XML data, the data parsing in < Root>node is program object R; When creating the XML data, the data in < Root>node are obtained from program object R.In addition, mapping relations 301 comprise two sub-mapping relations 302 and 303, and this is illustrated in the XML structure, and < Root>node comprises two node < Parent1>and < Parent2 >.
In addition, version scope and subset range can be omitted in sub-mapping relations, in this case, find father's mapping relations according to the structural information between the mapping relations, use the corresponding definition of the XML structural element in father's mapping relations.For example; Mapping relations 304 have been omitted version scope and subset range simultaneously, and mapping relations 305 have been omitted subset range, then can know according to the data definition in his father's mapping relations 302; The version scope of 304 definition is version 1-5; Subset range is subclass A, B, and the version scope of 305 definition is version 3s-5, and subset range is A, B.
Fig. 4 A is the process flow diagram according to the method for the parsing of the embodiment of the invention and establishment XML data.With reference to Fig. 4 A, this method may further comprise the steps:
Step 401, obtain version identifier and subclass sign when the electronic document of pre-treatment;
Step 404, begin to travel through XML structure mapping set of relationship from root node; To each concrete mapping relations; Judge in whether the version identifier of the electronic document of pre-treatment and subclass identify the version scope and subset range in these mapping relations; Be positioned at said scope if work as the version identifier and the subclass sign of the electronic document of pre-treatment, then execution in step 405, identify not in said scope if work as the version identifier and the subclass of the electronic document of pre-treatment; Then continue traversal mapping relations set downwards and repeat above step, till having traveled through the mapping relations set;
Step 405, utilize the corresponding relation of XML structure and program object; Dynamic creation XML organization definition metadata; Specifically; Mode through the corresponding relation with defined XML structural element of said mapping relations and program object model element adds in the XML organization definition metadata is come dynamic creation XML organization definition metadata, and the concrete metadata creation method and the metadata format of establishment are by the employed XML disposal route decision of bottom;
The XML organization definition metadata of step 407, the use employed XML disposal route of bottom and dynamic creation is come the processing XML data, accomplishes the mutual conversion of XML data and program object model.
It is to be noted; In above method; When traversing when mapping relations within its version scope and subset range of the version scope of the electronic file form of pre-treatment and subset range; Just the corresponding relation with XML structural element in these mapping relations and program object model element adds in the XML organization definition metadata; Thereby accomplish the establishment of XML organization definition metadata gradually, that is to say, traversal XML structure mapping set of relationship, the process of choosing the corresponding relation of the XML structural element that had when the pre-treatment electronic file form and program object model element and creating XML organization definition metadata are carried out synchronously.In other embodiments; Can also be at first in traversal XML structure mapping set of relationship, select the whole XML structural elements that had when the pre-treatment electronic file form and the corresponding relation of program object model element, create the XML structural element according to the corresponding relation of these XML structural elements and program object model element then.
In above method, also can the XML organization definition metadata of dynamic creation be added buffer memory, so just can be implemented in and share a XML organization definition metadata between the different electric subdocument with same version and subclass.Below will use the method for caching mechanism and the difference of the method for describing with reference to Fig. 4 A with reference to Fig. 4 B explanation.
The difference of Fig. 4 B and Fig. 4 A is to have increased step 402,403 and 406, and all the other steps are identical with Fig. 4 A.
In step 402, in XML organization definition metadata cache, be designated key and inquire about with the version identifier that in step 401, obtains and subclass.
Then; In step 403; Judge whether to find XML organization definition metadata, if in step 402, in XML organization definition metadata cache, find corresponding value, then execution in step 407; If in XML organization definition metadata cache, do not exist in version identifier and the subclass sign obtained in the step 401, then execution in step 404.
In step 405, after the dynamic creation XML organization definition metadata, in step 406, the XML organization definition metadata of creating is added buffer memory.
Below will specify the processing procedure of step 404 (traversal XML structure mapping set of relationship) and step 405 (dynamic creation XML organization definition metadata) with reference to Fig. 5 A and Fig. 5 B through a specific embodiment.
In the present embodiment, use Castor as the XML disposal route, then XML organization definition metadata format itself also is an XML document, can use mode such as DOM to create XML document during establishment, again XML document is saved as character string forms.In addition, XML organization definition metadata cache takes known " key-value " to memory technology, can be to a certain specific key; Storage, unique value of inquiry, wherein, version identifier and subclass sign have been formed key jointly; XML organization definition metadata is value; That is to say that the key of preserving in the XML organization definition metadata cache is the version identifier that in step 401, obtains and subclass sign, the value of preservation is the XML document of the character string forms that in step 405, obtains.In step 407, use Castor disposal route and the XML organization definition metadata of obtaining to come the processing XML data, accomplish the conversion between XML data and the program object model.
In Fig. 5 A; 301-306 representes the XML structure mapping set of relationship that processing procedure is required respectively; 501 to be illustrated in the version identifier when the electronic document of pre-treatment that obtains in the step 401 be 4, and the subclass sign is A, and 502 corresponding to the step 404 and 405 among Fig. 4 A and Fig. 4 B; The XML document structure that defines among the electronic file form edition 4 that 503-506 representes to take out through step 502 treatment of selected, the subclass A, the 507th, the XML organization definition metadata of the Castor form of creating.
The concrete processing procedure of step 502 is: travel through XML structure mapping set of relationship since 301; In the present embodiment; Follow the traversal order of depth-first; Travel through 301,302,304,305,303,306 successively, certainly, also can adopt other order that XML structure mapping set of relationship is traveled through; To each mapping relations; Relatively version identifier, the subclass in its version scope, the subset range definition and 501 identifies; For example the version scope of 305 definition is version 1-5; Subset range is subclass A, B, and the edition 4 shown in 501, subclass A are positioned at this scope, becomes 506 so XML structure that defines in 305 and program object are selected out; And the version scope of 303 definition is 1-3, and the edition 4 shown in 501 is not in this scope, so 303 corresponding XML structures are not selected; The 503-506 that use is chosen creates the XML document shown in 507, is the XML organization definition metadata of required Castor form.
Note; As stated; The process of the traversal XML structure mapping set of relationship in the step 502, the XML structure that electronic file form had of choosing the version identifier that has in 501 and subclass sign and program object, establishment XML organization definition metadata also can be carried out synchronously; Promptly in processing procedure, the XML structural element 503-506 that chooses out is also unnecessary to be occurred to create XML organization definition metadata 507 simultaneously; Can choose after 503, promptly create a part of 507, choose after 504, create 507 counterpart again, so accomplish the establishment of XML organization definition metadata successively.
Fig. 5 B shown the process that version identifier is 2, subclass is designated the electronic document dynamic creation XML organization definition metadata of B, wherein, 502 represented traversals, choose identical with constructive process with the process of describing with reference to Fig. 5 A.In Fig. 5 B, XML structure and the program object selected through step 502 are expressed as 512-515 respectively, and have created the XML organization definition metadata 516 that version identifier is 2, subclass is designated the electronic document of B in view of the above.
Can find out from Fig. 5 A and Fig. 5 B; The present invention is for a kind of specific electronic document version identifier and subclass identifier combination; Only need a XML organization definition of dynamic creation metadata; With its buffer memory, use then thereby make this metadata between different electric subdocument, to share with this particular version sign and subclass sign.The static XML organization definition metadata of using in the prior art, buffer memory only takies very little extra computation machine resource consumption.
It is pointed out that present embodiment with the application of electronic document as the XML document with multiple version and subclass, but the present invention is applicable to other application that meets the following conditions: (1) is applied to the mutual conversion between XML data and the program object model; (2) have version, subclass or similar notion, between different versions and subclass, the XML organization definition has modification.In addition; Said XML structure mapping set of relationship is not limited to mapping relations set shown in Figure 3, all should be included within protection scope of the present invention as long as can show the version scope of XML document form and the set of the mapping relations between subset range, XML structure and the program object model.
Correspondingly, the present invention provides a kind of system that is used for resolving and create the XML data of the XML document with multiple version and subclass, in this system, and the known display unit that is used to show the application of using XML document that comprises with multiple version and subclass.Below will the peculiar part of this system be described with reference to Fig. 6.
Can find out that from Fig. 6 this system also comprises: sign acquiring unit 100, obtain version identifier and subclass sign when the XML document of pre-treatment; XML data processing unit 200; The version scope of definition XML document form and the set of the mapping relations between subset range, XML structure and the program object model; Identify dynamic creation XML organization definition metadata according to the set of said mapping relations and version identifier and the subclass obtained through sign acquiring unit 100, and according to the mutual conversion of said XML organization definition metadata completion XML data and program object model.
Said XML data processing unit 200 comprises: create unit 202, define said mapping relations set, and identify dynamic creation XML organization definition metadata according to said mapping relations set and version identifier and the subclass obtained through sign acquiring unit 100; Converting unit 206, according to the mutual conversion of said XML organization definition metadata completion XML data and program object model, and the result that will change sends display unit to.The operation of these unit is with above identical with reference to the described method step of Fig. 4 A, and therefore, the descriptions thereof are omitted.
For sharing of XML organization definition metadata between the different XML documents of realizing same version and subclass, said XML data processing unit 200 also can comprise buffer unit 204, is used for buffer memory through creating the XML organization definition metadata that the unit is created.The operation of the XML data processing unit 200 of this moment is with above identical with reference to the described method step of Fig. 4 B, and therefore, the descriptions thereof are omitted.
Can find out from above description; The present invention uses an XML structure mapping set of relationship; Just can create out the XML organization definition metadata of the XML document form that meets multiple version and subclass; Do not have redundant XML organization definition, can save the modification and the maintenance that take and simplify application program computer resource.On the other hand, the definition relevant with subclass with the version of XML document form only is defined in the XML structure mapping set of relationship, and application program just can handle multiple versions with single method and the XML document of subclass, reduced the implementation complexity of application program.In addition, also used caching mechanism in the foregoing description, thereby making between the different document of same version and subclass, can share uses a XML organization definition metadata.
Above reference implementation example has been described the present invention.But; It should be appreciated by those skilled in the art, the invention is not restricted to the disclosed embodiments, under the situation that does not break away from ultimate principle of the present invention; Any similar modification, replacement or distortion all should be included in protection scope of the present invention, and protection scope of the present invention is defined by the claims.

Claims (12)

1. method of resolving and creating the XML data comprises:
The version scope of step 1, definition XML document form and the set of the mapping relations between subset range, XML structure and the program object model;
Step 2, identify dynamic creation XML organization definition metadata according to the set of said mapping relations with when the version identifier and the subclass of the XML document of pre-treatment;
Wherein, the XML structure root node of definition begins to travel through the mapping relations set from said mapping relations set, for each the bar mapping relations that traverses, carries out following steps:
Judge in whether the version identifier of the XML document of pre-treatment and subclass identify the version scope and subset range in these mapping relations;
Be positioned at said scope if work as the version identifier and the subclass sign of the XML document of pre-treatment, the mode of then adding in the XML organization definition metadata through the corresponding relation with XML structural element that defines in these mapping relations and program object model element is created XML organization definition metadata;
Identify not in said scope if work as the version identifier and the subclass of the XML document of pre-treatment, then continue to travel through mapping relations downwards and gather;
Step 3, accomplish the mutual conversion of XML data and program object model according to said XML organization definition metadata.
2. method according to claim 1; It is characterized in that; In said mapping relations set, an element, the one or more elements in the program object model and the version scope of XML document form and the corresponding relation of subset range in each bar mapping relations definition XML structure.
3. method according to claim 2; It is characterized in that; In said mapping relations set; The version scope and the subset range of XML document form are options, if undefined version scope of mapping relations and subset range are then used the corresponding definition of the XML structural element in father's mapping relations of these mapping relations in the said mapping relations set.
4. method according to claim 1 is characterized in that, said step 2 also comprises the step that the XML organization definition metadata of creating is added buffer memory.
5. method according to claim 4 is characterized in that, said step 2 comprises:
In XML organization definition metadata cache, search version identifier and subclass sign when the XML document of pre-treatment;
If in XML organization definition metadata cache, do not find said sign, then the XML structure root node of definition begins to travel through the mapping relations set from said mapping relations set, wherein, for each the bar mapping relations that traverses, carries out following steps:
Judge in whether the version identifier of the XML document of pre-treatment and subclass identify the version scope and subset range in these mapping relations;
Be positioned at said scope if work as the version identifier and the subclass sign of the XML document of pre-treatment, the mode of then adding in the XML organization definition metadata through the corresponding relation with XML structural element that defines in these mapping relations and program object model element is created XML organization definition metadata;
Identify not in said scope if work as the version identifier and the subclass of the XML document of pre-treatment, then continue to travel through mapping relations downwards and gather;
XML organization definition metadata with dynamic creation after having traveled through adds buffer memory.
6. method according to claim 4 is characterized in that, said XML organization definition metadata cache takes " key-value " to memory technology, wherein, the common key of forming of version identifier and subclass sign, XML organization definition metadata is a value.
7. a system that is used to resolve and create the XML data comprises the display unit that is used to show the application of using the XML document with multiple version and subclass, it is characterized in that this system also comprises:
The sign acquiring unit obtains version identifier and subclass sign when the XML document of pre-treatment;
XML data processing unit, said XML data processing unit comprise creates unit and converting unit;
Said establishment unit is used to define the set of said mapping relations, and identifies dynamic creation XML organization definition metadata according to said mapping relations set and version identifier and the subclass obtained through the sign acquiring unit;
Said converting unit is used for accomplishing according to said XML organization definition metadata the mutual conversion of XML data and program object model, and the result that will change sends display unit to;
Wherein, operation below the said establishment unit execution:
The XML structure root node of definition begins to travel through the mapping relations set from said mapping relations set, wherein, for each the bar mapping relations that traverses, carries out following steps:
Judge in whether the version identifier of the XML document of pre-treatment and subclass identify the version scope and subset range in these mapping relations;
Be positioned at said scope if work as the version identifier and the subclass sign of the XML document of pre-treatment, the mode of then adding in the XML organization definition metadata through the corresponding relation with XML structural element that defines in these mapping relations and program object model element is created XML organization definition metadata;
Identify not in said scope if work as the version identifier and the subclass of the XML document of pre-treatment, then continue to travel through mapping relations downwards and gather.
8. system according to claim 7 is characterized in that, said XML data processing unit also comprises buffer unit, is used for buffer memory through creating the XML organization definition metadata that the unit is created.
9. system according to claim 8 is characterized in that, operation below said establishment unit is carried out:
In buffer unit, search version identifier and subclass sign when the XML document of pre-treatment;
If in buffer unit, do not find said sign, then the XML structure root node of definition begins to travel through the mapping relations set from said mapping relations set, wherein, for each the bar mapping relations that traverses, carries out following steps:
Judge in whether the version identifier of the XML document of pre-treatment and subclass identify the version scope and subset range in these mapping relations;
Be positioned at said scope if work as the version identifier and the subclass sign of the XML document of pre-treatment, the mode of then adding in the XML organization definition metadata through the corresponding relation with XML structural element that defines in these mapping relations and program object model element is created XML organization definition metadata;
Identify not in said scope if work as the version identifier and the subclass of the XML document of pre-treatment, then continue to travel through mapping relations downwards and gather;
XML organization definition metadata with dynamic creation after having traveled through adds buffer unit.
10. system according to claim 8 is characterized in that, said buffer unit takes " key-value " to memory technology, wherein, the common key of forming of version identifier and subclass sign, XML organization definition metadata is a value.
11. system according to claim 7; It is characterized in that; In said mapping relations set, an element, the one or more elements in the program object model and the version scope of XML document form and the corresponding relation of subset range in each bar mapping relations definition XML structure.
12. system according to claim 11; It is characterized in that; In said mapping relations set; The version scope and the subset range of XML document form are options, if undefined version scope of mapping relations and subset range are then used the corresponding definition of the XML structural element in father's mapping relations of these mapping relations in the said mapping relations set.
CN200910238244.2A 2009-11-23 2009-11-23 Method and system for analyzing and creating XML (Extensible Markup Language) data Expired - Fee Related CN102073662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910238244.2A CN102073662B (en) 2009-11-23 2009-11-23 Method and system for analyzing and creating XML (Extensible Markup Language) data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910238244.2A CN102073662B (en) 2009-11-23 2009-11-23 Method and system for analyzing and creating XML (Extensible Markup Language) data

Publications (2)

Publication Number Publication Date
CN102073662A CN102073662A (en) 2011-05-25
CN102073662B true CN102073662B (en) 2012-12-19

Family

ID=44032206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910238244.2A Expired - Fee Related CN102073662B (en) 2009-11-23 2009-11-23 Method and system for analyzing and creating XML (Extensible Markup Language) data

Country Status (1)

Country Link
CN (1) CN102073662B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821116B (en) * 2011-06-08 2016-08-03 金蝶软件(中国)有限公司 A kind of online service provides method, device and information system
CN102882844B (en) * 2012-07-20 2015-05-13 广东电网公司电力科学研究院 XMLfile-based multi-screen interactive show realization method
CN103902539B (en) * 2012-12-25 2017-11-03 三星电子(中国)研发中心 Extensible markup analysis method and device
CN104462025A (en) * 2013-10-29 2015-03-25 上海宝信软件股份有限公司 Buffering method and system for accelerating bidding document generation
CN104268143B (en) * 2014-08-08 2017-10-20 华迪计算机集团有限公司 The treating method and apparatus of XML data
CN115935946B (en) * 2022-12-05 2023-08-15 成都延华西部健康医疗信息产业研究院有限公司 Analytical mapping processing method and device for HL7V3 standard/FHIR standard
CN116149724B (en) * 2023-04-18 2023-09-22 清华大学 System virtual prototype version difference analysis method and device and computer equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913522A (en) * 2005-12-23 2007-02-14 王建波 RSS message interactive processing method based on XML file
CN101221556A (en) * 2008-02-01 2008-07-16 中国建设银行股份有限公司 Method and device for XML document analysis

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913522A (en) * 2005-12-23 2007-02-14 王建波 RSS message interactive processing method based on XML file
CN101221556A (en) * 2008-02-01 2008-07-16 中国建设银行股份有限公司 Method and device for XML document analysis

Also Published As

Publication number Publication date
CN102073662A (en) 2011-05-25

Similar Documents

Publication Publication Date Title
CN102073662B (en) Method and system for analyzing and creating XML (Extensible Markup Language) data
US9619448B2 (en) Automated document revision markup and change control
Brown et al. Implementation patterns for microservices architectures
US7275087B2 (en) System and method providing API interface between XML and SQL while interacting with a managed object environment
US7346598B2 (en) Schemaless dataflow within an XML storage solution
CN101771681B (en) Page display control method, server and system
US8103705B2 (en) System and method for storing text annotations with associated type information in a structured data store
CN100541493C (en) The apparatus and method that are used for structured document management
CN107391153B (en) Code generation method and device based on Spring and MyBatis framework integration
US7873678B2 (en) Lightweight directory access protocol (LDAP) schema definition using extensible markup language (XML)
CN102566984B (en) Method and device for configuring parameters
CN104881285A (en) Code snippet marking and reusing system based on body
CN106339498A (en) Method, device and system for synchronizing data
US10031981B2 (en) Exporting data to web-based applications
CN102622219A (en) Method, device and system for rendering execution result of dynamic transfer service
US20100169333A1 (en) Document processor
US9411792B2 (en) Document order management via binary tree projection
CN1588352A (en) Recording method for extendable mark language file repairing trace
US20080276230A1 (en) Processing bundle file using virtual xml document
CN101944133A (en) XML metadata objectification analytic method and system
US8086561B2 (en) Document searching system and document searching method
JP2017521759A (en) Computer-implemented method, computer program, and apparatus for correlating artifacts between versioned and unversioned domains
JP2006127235A (en) Structured document management system, structured document management method and program
US20070299676A1 (en) System and method of member unique names
JP2018142271A (en) Api convention checking apparatus, api convention checking method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220914

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: PEKING University FOUNDER R & D CENTER

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 5 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: PEKING University FOUNDER R & D CENTER

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121219