JAXB User Experience 1 (XML Java Analysis)

xiaoxiao2021-03-06  21

AXB provides a brief channel for XML operation. Very good use it will make you improve your efficiency in XML operation, using it needs to know some basic content. Here is just how to generate an XML file, and other advanced operations are not involved.

Down to the Sun's website is a JWSDP-1.5, which provides all the related packages related to XML, and some useful tools. Because I only used Jaxb inside, so I just wonder the basic application of this aspect.

First of all, you have to know what XML is something, I am also blurred, just a little introduction to the use of this package. Each XML file has its specific schema (style sheet) indicates that it is made of those elements, whereby the XML structure map to be mapped to the corresponding Object, which needs to use the corresponding Schema file, is *. XSD file, JAXB package to provide the XJC tool to generate the Object object that you need through the XSD file in the structure of your project, named mode, and an element name in XML in the XML tool. Specifically, the method of using the XJC tool is in the DOC provided, you can also complete the XJC to the Ant tool to complete a lot of work together. Depending on your pocket, you can use it for XML different operations, like I use its XML-Binding feature (I want to use the generated XML class object set into different data, and finally Marshal became An XML file. Marshal is a way that the JAXB itself provides a way to generate XML-Object to generate an XML file. Tap, 1) Generate the XML object you need with XJC through the XSD file in your project. . 2) Generate the XML you want with the Marshal method after plugging the value of your object.

转载请注明原文地址:https://www.9cbs.com/read-42583.html

New Post(0)