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

A method and device for parsing xml messages

An analysis method and message technology, applied in the field of communication, can solve problems such as long time

Active Publication Date: 2019-04-05
CHINA MOBILE GRP HENAN CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0011] The embodiment of the present invention provides a method and device for parsing an XML message, which is used to solve the problem that it takes a long time to parse an XML message using the existing XML message parsing method

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
  • A method and device for parsing xml messages
  • A method and device for parsing xml messages
  • A method and device for parsing xml messages

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0025] The following describes specific implementations of the method and device for parsing an XML message provided by the embodiments of the present invention with reference to the drawings in the specification.

[0026] An XML message parsing method provided by an embodiment of the present invention, such as figure 1 As shown, it specifically includes the following steps:

[0027] S11: Determine the position of the end character of the first designated node in the XML message to be parsed, and determine the position as a dividing line, and divide the XML message into a first XML message and a second XML message;

[0028] S12: Determine the position of the start character of the designated node in the first XML message, and intercept the character string from the start character to the position of the end character from the first XML message;

[0029] S13: parse the intercepted character string to obtain relevant information of each element contained in the designated node, use the n...

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 embodiment of the invention provides an XML (Extensive Markup Language) message analyzing method and device. The method comprises the steps of determining the position of an end character of the first specified node in an XML message to be analyzed; dividing the XML message into a first XML message and a second XML message by using the determined position as the boundary; determining the position of a start character of the specified node in the first XML message, intercepting the character string from the position of the start character to the position of the end character in the first XML message; analyzing the intercepted character string to obtain related information of each element in the specified node; treating the next specified node as the first specified node and treating the second XML message as the XML message, and then returning to step of determining the position of the end character until analyzing all specified nodes. According to the method, part of the character string corresponding to the node of the element required by a user can be analyzed only, so that more analyzing time can be saved.

Description

Technical field [0001] The invention relates to the field of communication technology, and in particular to an XML message parsing method and device. Background technique [0002] At present, Extensible Markup Language (XML) message parsing is used more and more widely in WEB applications, especially in Web services, for example, in parsing XML messages in Web services At the time, the jdom method and dom4J method are usually used to realize the analysis. [0003] Specifically, when using the jdom method to parse an XML message, the specific analysis process performed by the parser SAX is: convert all the strings in the XML message into a document object (document), that is, a DOM tree structure; The subsequent document object performs sequential scanning and traversal operations, and finally obtains the relevant information of the element required by the user, such as element or element attribute value. In the process of SAX parsing the document object, when encountering the beg...

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): H04L29/06H04L29/08
Inventor 张博蒋乐曹王华吴桂祥
Owner CHINA MOBILE GRP HENAN CO LTD