Optional XML in a relational database, part 2nd

Source: Internet
Author: User
Tags definition command line web services xslt java web

creating, storing, and manipulating optional XML data using JAXB and Java annotations

To move an XML-defined optional data into a relational database

Introduction: This article explores the software needed to create, store, and manipulate optional XML relational data-part 2nd of the 2-part series. This article provides code examples that are fully operational, including Java architecture for XML Binding (JAXB), Java Persistence API (JPA)/hibernate, memory databases, persistence-related databases.

In the relational database for this series, optional XML, part 1th: Do you want a null value? , you learned how to use JAXB to convert an XML domain to Java code. This concept of inter-domain transformation is useful in many areas of learning-for example, moving from a time domain to a frequency domain in a signal processing domain. A related example is XSLT, where style sheets are used to convert XML into other text formats, such as HTML. Now, take a look at the settings that JAXB requires.

Setting up JAXB

Normally, I don't introduce software installations too much, but for the Java Web Services Developer Pack (see Resources), installation is more complex than usual. Therefore, I will introduce this process, to help you successfully complete the installation, so that its normal operation.

First, you want to download version 2.0 of the package. Web Services downloads are relatively small -23mb and will not take too long. If you want to learn more after reading this article, you can download the Web Service documentation package (found on the same page). To run the InstallShield Wizard, double-click the downloaded executable file, and then follow the instructions. I recommend that you do not install a WEB container. In addition, I use C:\Sun\jwsdp-2.0 as the installation directory.

Common abbreviations

API: Application Programming Interface (Application programming Interface)

HTML: Hypertext Markup Language (hypertext Markup Language)

SQL: Structured Query Language (structured query Language)

XML: Extensible Markup Language (extensible Markup Language)

Xsd:xml schema Definition (XML schema definition)

XSLT: Extensible Stylesheet Language Transformation (extensible Stylesheet Language Transformation)

After installing the downloaded software, there is only one most important thing to do: In the%java_home%\jre\lib directory, create a folder named endorsed. Then, paste the contents of the C:\Sun\jwsdp-2.0\lib folder into the new folder%java_home% \jre\lib\endorsed. The%java_home% environment variable is the full path to the JAVA Software Development Kit (JDK) installation. If you prefer, you can use the Java.endorsed.dirs system directory at the command line, and creating a new directory is a simpler approach.

You will also need a copy of Apache Ant (see Resources). Download and install Ant to ensure that the executable program is in the system path.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.