Method for binding Java and XML data

A data binding, java-like technology, applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve the problem of not providing data binding methods, etc., to achieve good access speed, reduce development difficulty, and easy access. Effect

Active Publication Date: 2010-04-28
SHANGHAI BAOSIGHT SOFTWARE CO LTD
View PDF4 Cites 27 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But in actual use, the scope of use of Java is higher, and the...

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 for binding Java and XML data
  • Method for binding Java and XML data
  • Method for binding Java and XML data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0072] pass below Figures 1 to 4 , to introduce a specific embodiment of the present invention.

[0073] Such as Figures 2 to 4 Shown, a kind of method of realizing Java and XML data binding of the present invention comprises the following steps:

[0074] Step 1: Design an XML document that conforms to the specification. The XML that uses this method to realize data binding needs to conform to the XML design specification.

[0075] Step 2: Create Java classes corresponding to the elements according to the structure of the XML document.

[0076] XML element types include simple types and complex types. The values ​​of simple types cannot contain elements or attributes. Complex types can produce the effect of nesting elements in other elements, or add attributes to elements.

[0077] Each complex-type element in an XML document should have a Java class corresponding to it, and the attributes in the element and simple-type sub-elements correspond to the attributes of the Jav...

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 for binding Java and XML data, which comprises the following steps of: 1) designing an XML document; 2) creating a Java class corresponding to an element according to the structure of the XML document; 3) setting a corresponding relationship between the XML element and the Java class; 4) realizing a disorganization algorithm, adopting a recursive algorithm to transverse an XML document tree, and creating a Java object corresponding to the structure of the XML document; 5) realizing a grouping algorithm, adopting the recursive algorithm to transverse a Java object tree, and creating an XML document corresponding to the whole Java object tree; and 6) realizing a disorganization class and a grouping class. The method realizes bidirectional data mapping binding between the Java object and the XML document, simplifies development work by using the XML, realizes an automation process from resolving the XML document to creating the Java object, and can write the modified Java object back to the XML document and conveniently adapt to the change of the structure of the XML document by modifying few Java codes.

Description

technical field [0001] The invention relates to the field of government and enterprise management software, in particular to a method for realizing data binding between Java and XML. Background technique [0002] XML (Extensible Markup Language) is an extensible markup language. It is a simple data storage language. It uses a series of simple tags to describe data, and these tags can be established in a convenient way. Because XML is simple and easy to grasp and use, it makes XML Widely used in various application software, it has become an important part of software development and configuration and a common language for data exchange. The basic APIs for processing XML in Java are DOM, SAX, JDOM, dom4j, etc. These APIs provide solutions for Java to process XML, but the disadvantage is that the use method is complicated and errors are prone to occur during the use process. [0003] Java and XML data binding is a more advanced XML processing mechanism based on the basic API,...

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
IPC IPC(8): G06F9/44G06F17/30
Inventor 许正超
Owner SHANGHAI BAOSIGHT SOFTWARE CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products