Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Examples/MOXy/GettingStarted/ExternalizedMetadata"

(New page: ==Overview==)
 
(Overview)
Line 1: Line 1:
 
==Overview==
 
==Overview==
 +
<source lang="xml">
 +
<?xml version="1.0"?>
 +
<xml-bindings
 +
        xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
 +
        version="2.1">
 +
    <java-types>
 +
        <java-type name="example.gettingstarted.Customer">
 +
            <xml-root-element/>
 +
            <xml-type prop-order="name address phoneNumbers"/>
 +
            <java-attributes>
 +
                <xml-element java-attribute="name" xml-path="personal-info/name/text()"/>
 +
                <xml-element java-attribute="address" xml-path="contact-info/address"/>
 +
                <xml-element java-attribute="phoneNumbers" xml-path="contact-info/phone-numbers"/>
 +
            </java-attributes>
 +
        </java-type>
 +
        <java-type name="example.gettingstarted.PhoneNumber">
 +
            <xml-root-element/>
 +
            <java-attributes>
 +
                <xml-attribute java-attribute="type"/>
 +
                <xml-value java-attribute="number"/>
 +
            </java-attributes>
 +
        </java-type>
 +
    </java-types>
 +
</xml-bindings>
 +
</source>

Revision as of 12:02, 16 June 2010

Overview

<?xml version="1.0"?>
<xml-bindings 
        xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
        version="2.1">
    <java-types>
        <java-type name="example.gettingstarted.Customer">
            <xml-root-element/>
            <xml-type prop-order="name address phoneNumbers"/>
            <java-attributes>
                <xml-element java-attribute="name" xml-path="personal-info/name/text()"/>
                <xml-element java-attribute="address" xml-path="contact-info/address"/>
                <xml-element java-attribute="phoneNumbers" xml-path="contact-info/phone-numbers"/>
            </java-attributes>
        </java-type>
        <java-type name="example.gettingstarted.PhoneNumber">
            <xml-root-element/>
            <java-attributes>
                <xml-attribute java-attribute="type"/>
                <xml-value java-attribute="number"/>
            </java-attributes>
        </java-type>
    </java-types>
</xml-bindings>

Copyright © Eclipse Foundation, Inc. All Rights Reserved.