Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for processing XML (Extensible Markup Language) packets

A technology of messages and message data, which is applied in the field of data communication and can solve problems such as the inability to parse large batches of XML messages

Active Publication Date: 2014-09-10
FEITIAN TECHNOLOGIES
View PDF2 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The invention provides a method and device for processing XML messages, which solves the problem that large batches of XML messages cannot be completely parsed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for processing XML (Extensible Markup Language) packets
  • Method and device for processing XML (Extensible Markup Language) packets
  • Method and device for processing XML (Extensible Markup Language) packets

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 2

[0057] Embodiment 2 of the present invention provides a method for processing XML messages, such as figure 2 As shown, a method for processing XML messages includes the following steps:

[0058] Step 201: Waiting to receive the XML message, and storing the received XML message in the first buffer area;

[0059] Step 202: updating the first counter according to the currently received XML message;

[0060] In this embodiment, updating the first counter is specifically: updating the count value of the first counter to the sum of the current count value of the first counter and the length of the received XML message;

[0061] Wherein, the initial count value of the first counter is zero;

[0062] Step 203: judging whether the count value of the first counter is smaller than the maximum storage value of the second buffer area, if yes, execute step 209; otherwise, execute step 204;

[0063] Step 204: selecting XML message data from the first buffer area, and storing the selected...

Embodiment 3

[0078] Embodiment 3 of the present invention provides a method for parsing XML message data,

[0079] Such as image 3 shown, including the following steps:

[0080] Step 301: setting a second counter according to the length of the XML message in the second buffer;

[0081] In this embodiment, the second counter is used to count the length of the XML message data in the second buffer;

[0082] Step 302: Initialize the first status bit;

[0083] In this embodiment, the initialization of the first state bit is specifically: initializing the value of the first state bit to a first preset value;

[0084] Step 303: judging whether the count of the second counter is zero, if yes, execute step 306; otherwise, execute step 304;

[0085] Step 304: Read a byte of data from the second buffer area according to the value of the first pointer variable, use the read byte data as the current byte data, and update the first pointer variable and the counting by the second counter;

[0086...

Embodiment 4

[0110] Embodiment 4 of the present invention provides a method for parsing start tags, which will be combined below Figure 4 Describe the method in detail.

[0111] Such as Figure 4 As shown, a method for parsing start tags includes the following steps:

[0112] Step 401: adding one to the value of the first depth variable, and setting a third pointer variable;

[0113] In this embodiment, the third pointer variable is used to record and obtain attribute information, tag name and tag content information;

[0114] Step 402: Initialize the second status bit and the third status bit;

[0115]In this embodiment, the initialization of the second state bit and the third state bit is specifically: initializing the values ​​of the second state bit and the third state bit to the third preset value and the fourth default value;

[0116] Step 403: judging whether the count of the second counter is 0, if yes, execute step 406; otherwise, execute step 404;

[0117] Step 404: Read a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for processing XML messages, belonging to the field of data communication. The method includes the following steps: when a preset condition is met, storing part or all of the XML message data in the first buffer area to the second A cache area, clearing the XML message data stored in the second cache area in the first cache area, when there is XML message data in the first cache area that has not been stored in the second cache area , moving forward the XML message data that has not been stored in the second buffer area; and parsing the XML message data in the second buffer area. The invention can receive and analyze XML message data in batches by setting the first buffer area and the second buffer area, and effectively solves the problem that batch XML messages cannot be completely parsed.

Description

technical field [0001] The invention relates to the field of data communication, in particular to a method and device for processing XML messages. Background technique [0002] XML (Extensible Markup Language, Extensible Markup Language), is a standard universal language. As a convenient tool for manipulating data and data transmission, XML is playing an increasingly important role in the current Web development. [0003] In the existing technologies for parsing XML messages, usually the received XML message is directly matched with a pre-stored template, the template is used to parse the XML message, and the parsing result is output. [0004] In the process of realizing the present invention, the inventor finds that the prior art has at least the following defects: [0005] If the data of the XML message is too long, due to the limitations of the memory and the communication protocol, the existing technology cannot receive the XML message as a whole, and cannot perform a ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04L12/70H04L47/43
Inventor 陆舟于华章
Owner FEITIAN TECHNOLOGIES