Method for converting xml data into json data based on javascript
A technology of data and object data, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve the problem that plug-ins cannot be directly applied, and achieve the effect of solving the problem of object data format and simple operation
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0024] A method of converting xml data to json data based on javascript:
[0025] Parse the input xml data into xml object data,
[0026] Create a data parsing event, pass in the new object and xml object data,
[0027] According to the incoming new object and xml object data, it is judged whether the root node contains an attribute value, the attribute value is processed, and stored in the new object in the form of a child node.
[0028] Obtain the value of the root node, determine whether it is empty, store the node value in the data node, obtain the child nodes of the root node, determine the number of child nodes, and store the data in the new object according to the result.
[0029] The parsed data is returned as a json object.
[0030] Utilize above-mentioned method, the present invention will be further described in conjunction with accompanying drawing.
[0031] In the above method, to obtain the value of the root node, determine whether it is empty, store the node ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More - R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com
