A method and device for parsing xml
A DOM tree and element technology, used in semi-structured data retrieval, special data processing applications, semi-structured data indexing, etc., can solve the problem of XML occupying too much system memory
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0087] In the first embodiment of the present invention, a method for parsing XML, such as figure 1 shown, including the following specific steps:
[0088] Step S101, defining a character string indication structure.
[0089] Wherein, the string indication structure includes: the content length Length of the string, the buffer pointer Buffer of the string, and the memory allocation mark MaximumLength of the string buffer.
[0090] E.g:
[0091]
[0092]
[0093] As another example, using the Windows native structure UNICODE_STRING:
[0094]
[0095] Step S102, define the DOM tree node structure of the document object model, and in the DOM tree node structure, indicate the character strings of each element in the XML document through the string indicator structure, so as to reuse the text buffer of the XML document.
[0096] Among them, the DOM tree node structure includes: element name Name member, element text content Content member, element attribute list Attribu...
no. 2 example
[0125] In the second embodiment of the present invention, a method for parsing XML includes the following specific steps:
[0126] Step S201, defining a character string indication structure.
[0127] Wherein, the string indication structure includes: the content length Length of the string, the buffer pointer Buffer of the string, and the memory allocation mark MaximumLength of the string buffer.
[0128] Step S202, define the DOM tree node structure of the document object model, and in the DOM tree node structure, indicate the character strings of each element in the XML document through the string indicator structure, so as to reuse the text buffer of the XML document.
[0129] Among them, the DOM tree node structure includes: element name Name member, element text content Content member, element attribute list Attributes member and element relationship Relationship member;
[0130] The type of the element Name member is a string indicating structure;
[0131] The type of...
no. 3 example
[0161] In the third embodiment of the present invention, a device for parsing XML, such as Figure 2 ~ Figure 3 shown, including the following components:
[0162] The first definition module 100 is configured to define a character string indication structure.
[0163] Wherein, the string indication structure includes: the content length Length of the string, the buffer pointer Buffer of the string, and the memory allocation mark MaximumLength of the string buffer.
[0164] E.g:
[0165]
[0166] As another example, using the Windows native structure UNICODE_STRING:
[0167]
[0168] The second definition module 200 is used to define the DOM tree node structure of the document object model, and in the DOM tree node structure, the character string of each element in the XML document is indicated by the string indication structure, so as to reuse the text buffer of the XML document.
[0169] Among them, the DOM tree node structure includes: element name Name member, eleme...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com