<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8"/>
<title>EclipseLink/Examples/MOXy/EclipseLink-OXM.XML - Eclipsepedia</title>
<script>document.documentElement.className = document.documentElement.className.replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );</script>
<script>window.RLQ = window.RLQ || []; window.RLQ.push( function () {
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":!1,"wgNamespaceNumber":0,"wgPageName":"EclipseLink/Examples/MOXy/EclipseLink-OXM.XML","wgTitle":"EclipseLink/Examples/MOXy/EclipseLink-OXM.XML","wgCurRevisionId":254162,"wgRevisionId":254162,"wgArticleId":25816,"wgIsArticle":!0,"wgIsRedirect":!1,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["EclipseLink/Examples/MOXy"],"wgBreakFrames":!1,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"EclipseLink/Examples/MOXy/EclipseLink-OXM.XML","wgRelevantArticleId":25816,"wgIsProbablyEditable":!1,"wgRestrictionEdit":[],"wgRestrictionMove"
:[],"wgWikiEditorEnabledModules":{"toolbar":!1,"dialogs":!1,"preview":!1,"publish":!1},"wgCategoryTreePageCategoryOptions":"{\"mode\":0,\"hideprefix\":20,\"showcount\":true,\"namespaces\":false}"});mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"variant":"en"});});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":"+\\","patrolToken":"+\\","watchToken":"+\\"});});mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits"]);
} );</script>
<link rel="stylesheet" href="/load.php?debug=false&amp;lang=en&amp;modules=mediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.sectionAnchor&amp;only=styles&amp;skin=solstice"/>
<link rel="stylesheet" href="/skins/solstice/public/css/styles.css?303" media="screen, print"/>
<meta name="ResourceLoaderDynamicStyles" content=""/>
<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}</style>
<script async="" src="/load.php?debug=false&amp;lang=en&amp;modules=startup&amp;only=scripts&amp;skin=solstice"></script>
<meta name="generator" content="MediaWiki 1.26.4"/>
<link rel="shortcut icon" href="/eclipse.org-common/themes/solstice/public/images/favicon.ico"/>
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch_desc.php" title="Eclipsepedia (en)"/>
<link rel="EditURI" type="application/rsd+xml" href="https://wiki.eclipse.org/api.php?action=rsd"/>
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom feed" href="/index.php?title=Special:RecentChanges&amp;feed=atom"/>
<style type="text/css">/*<![CDATA[*/
.source-xml {line-height: normal;}
.source-xml li, .source-xml pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for xml
 * CSS class: source-xml, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.xml.source-xml .de1, .xml.source-xml .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.xml.source-xml  {font-family:monospace;}
.xml.source-xml .imp {font-weight: bold; color: red;}
.xml.source-xml li, .xml.source-xml .li1 {font-weight: normal; vertical-align:top;}
.xml.source-xml .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.xml.source-xml .li2 {font-weight: bold; vertical-align:top;}
.xml.source-xml .es0 {color: #000099; font-weight: bold;}
.xml.source-xml .br0 {color: #66cc66;}
.xml.source-xml .sy0 {color: #66cc66;}
.xml.source-xml .st0 {color: #ff0000;}
.xml.source-xml .nu0 {color: #cc66cc;}
.xml.source-xml .sc-1 {color: #808080; font-style: italic;}
.xml.source-xml .sc0 {color: #00bbdd;}
.xml.source-xml .sc1 {color: #ddbb00;}
.xml.source-xml .sc2 {color: #339933;}
.xml.source-xml .sc3 {color: #009900;}
.xml.source-xml .re0 {color: #000066;}
.xml.source-xml .re1 {color: #000000; font-weight: bold;}
.xml.source-xml .re2 {color: #000000; font-weight: bold;}
.xml.source-xml .ln-xtra, .xml.source-xml li.ln-xtra, .xml.source-xml div.ln-xtra {background-color: #ffc;}
.xml.source-xml span.xtra { display:block; }

/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
.source-java {line-height: normal;}
.source-java li, .source-java pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for java
 * CSS class: source-java, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.java.source-java .de1, .java.source-java .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.java.source-java  {font-family:monospace;}
.java.source-java .imp {font-weight: bold; color: red;}
.java.source-java li, .java.source-java .li1 {font-weight: normal; vertical-align:top;}
.java.source-java .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.java.source-java .li2 {font-weight: bold; vertical-align:top;}
.java.source-java .kw1 {color: #7F0055; font-weight: bold;}
.java.source-java .kw2 {color: #7F0055; font-weight: bold;}
.java.source-java .kw3 {color: #000000; font-weight: normal}
.java.source-java .kw4 {color: #7F0055; font-weight: bold;}
.java.source-java .co1 {color: #3F7F5F; font-style: italic;}
.java.source-java .co2 {color: #3F7F5F;}
.java.source-java .co3 {color: #3F7F5F; font-style: italic; font-weight: bold;}
.java.source-java .coMULTI {color: #3F5FBF; font-style: italic;}
.java.source-java .es0 {color: #000000;}
.java.source-java .br0 {color: #000000;}
.java.source-java .sy0 {color: #000000;}
.java.source-java .st0 {color: #2A00ff;}
.java.source-java .nu0 {color: #000000;}
.java.source-java .me1 {color: #000000;}
.java.source-java .me2 {color: #000000;}
.java.source-java .ln-xtra, .java.source-java li.ln-xtra, .java.source-java div.ln-xtra {background-color: #ffc;}
.java.source-java span.xtra { display:block; }

/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
.source-text {line-height: normal;}
.source-text li, .source-text pre {
	line-height: normal; border: 0px none white;
}
/**
 * GeSHi Dynamically Generated Stylesheet
 * --------------------------------------
 * Dynamically generated stylesheet for text
 * CSS class: source-text, CSS id: 
 * GeSHi (C) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann
 * (http://qbnz.com/highlighter/ and http://geshi.org/)
 * --------------------------------------
 */
.text.source-text .de1, .text.source-text .de2 {font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;}
.text.source-text  {font-family:monospace;}
.text.source-text .imp {font-weight: bold; color: red;}
.text.source-text li, .text.source-text .li1 {font-weight: normal; vertical-align:top;}
.text.source-text .ln {width:1px;text-align:right;margin:0;padding:0 2px;vertical-align:top;}
.text.source-text .li2 {font-weight: bold; vertical-align:top;}
.text.source-text .ln-xtra, .text.source-text li.ln-xtra, .text.source-text div.ln-xtra {background-color: #ffc;}
.text.source-text span.xtra { display:block; }

/*]]>*/
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-EclipseLink_Examples_MOXy_EclipseLink-OXM_XML skin-solstice action-view" id="solstice">

<a class="sr-only" href="#content">Skip to main content</a>
<header class="header-wrapper" id="header-wrapper">
  <div class="clearfix toolbar-container-wrapper">
    <div class="container-fluid">
      <div class="text-right toolbar-row row hidden-print">
        <div class="col-md-24 row-toolbar-col">
               <ul class="list-inline">
                  <li id="pt-login">
            <a href="/index.php?title=Special:UserLogin&amp;returnto=EclipseLink%2FExamples%2FMOXy%2FEclipseLink-OXM.XML" class="toolbar-link toolbar-login">
              <i class="fa fa-sign-in fa-fw"></i> Log in            </a>
          </li>
                <li><a class="toolbar-link toolbar-manage-cookies dropdown-toggle"><i class="fa fa-wrench"></i> Manage Cookies</a></li>
      </ul>
            </div>
      </div>
    </div>
  </div>
  <div class="container-fluid">
    <div class="row" id="header-row">
      <div class="col-sm-5 col-md-4" id="header-left">
        <div class="wrapper-logo-default"><a href="https://www.eclipse.org/"><img class="logo-eclipse-default hidden-xs" alt="Eclipse.org logo" width="160" src="//www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg"/></a></div>
      </div>
      <div class="col-sm-19 col-md-20 margin-top-10" id="main-menu-wrapper">
        <div class="float-right hidden-xs" id="btn-call-for-action"><a href="https://eclipse.org/downloads/" class="btn btn-huge btn-warning"><i class="fa fa-download"></i> Download</a></div>
        <div class="navbar yamm float-sm-right" id="main-menu">
          <div class="navbar-collapse collapse" id="navbar-main-menu">
            <ul class="nav navbar-nav">
              <li><a href="https://www.eclipse.org/projects/" target="_self">Projects</a></li>
              <li><a href="https://www.eclipse.org/org/workinggroups/" target="_self">Working Groups</a></li>
              <li><a href="https://www.eclipse.org/membership/" target="_self">Members</a></li>
              <li class="dropdown visible-xs">
                <a href="#" data-toggle="dropdown" class="dropdown-toggle">Community <b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="http://marketplace.eclipse.org">Marketplace</a></li>
                  <li><a href="http://events.eclipse.org">Events</a></li>
                  <li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li>
                  <li><a href="https://www.eclipse.org/community/eclipse_newsletter/">Newsletter</a></li>
                  <li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li>
                  <li><a href="https://blogs.eclipse.org">Blogs</a></li>
                </ul>
              </li>
              <li class="dropdown visible-xs">
                <a href="#" data-toggle="dropdown" class="dropdown-toggle">Participate <b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
                  <li><a href="https://www.eclipse.org/forums/">Forums</a></li>
                  <li><a href="https://www.eclipse.org/mail/">Mailing Lists</a></li>
                  <li><a href="https://wiki.eclipse.org/">Wiki</a></li>
                  <li><a href="https://wiki.eclipse.org/IRC">IRC</a></li>
                  <li><a href="https://www.eclipse.org/org/research/">Research</a></li>
                </ul>
              </li>
              <li class="dropdown visible-xs">
                <a href="#" data-toggle="dropdown" class="dropdown-toggle">Eclipse IDE <b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li><a href="https://www.eclipse.org/downloads">Download</a></li>
                  <li><a href="https://www.eclipse.org/eclipseide">Learn More</a></li>
                  <li><a href="https://help.eclipse.org">Documentation</a></li>
                  <li><a href="https://www.eclipse.org/getting_started">Getting Started / Support</a></li>
                  <li><a href="https://www.eclipse.org/contribute/">How to Contribute</a></li>
                  <li><a href="https://www.eclipse.org/ide/">IDE and Tools</a></li>
                  <li><a href="https://www.eclipse.org/forums/index.php/f/89/">Newcomer Forum</a></li>
                </ul>
              </li>
              <!-- More -->
              <li class="dropdown eclipse-more hidden-xs">
                <a data-toggle="dropdown" class="dropdown-toggle" role="button">More<b class="caret"></b></a>
                <ul class="dropdown-menu">
                  <li>
                    <!-- Content container to add padding -->
                    <div class="yamm-content">
                      <div class="row">
                        <ul class="col-sm-8 list-unstyled">
                          <li>
                            <p><strong>Community</strong></p>
                          </li>
                          <li><a href="http://marketplace.eclipse.org">Marketplace</a></li>
                          <li><a href="http://events.eclipse.org">Events</a></li>
                          <li><a href="http://www.planeteclipse.org/">Planet Eclipse</a></li>
                          <li><a href="https://www.eclipse.org/community/eclipse_newsletter/">Newsletter</a></li>
                          <li><a href="https://www.youtube.com/user/EclipseFdn">Videos</a></li>
                          <li><a href="https://blogs.eclipse.org">Blogs</a></li>
                        </ul>
                        <ul class="col-sm-8 list-unstyled">
                          <li>
                            <p><strong>Participate</strong></p>
                          </li>
                          <li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
                          <li><a href="https://www.eclipse.org/forums/">Forums</a></li>
                          <li><a href="https://www.eclipse.org/mail/">Mailing Lists</a></li>
                          <li><a href="https://wiki.eclipse.org/">Wiki</a></li>
                          <li><a href="https://wiki.eclipse.org/IRC">IRC</a></li>
                          <li><a href="https://www.eclipse.org/org/research/">Research</a></li>
                        </ul>
                        <ul class="col-sm-8 list-unstyled">
                          <li>
                            <p><strong>Eclipse IDE</strong></p>
                          </li>
                          <li><a href="https://www.eclipse.org/downloads">Download</a></li>
                          <li><a href="https://www.eclipse.org/eclipseide">Learn More</a></li>
                          <li><a href="https://help.eclipse.org">Documentation</a></li>
                          <li><a href="https://www.eclipse.org/getting_started">Getting Started / Support</a></li>
                          <li><a href="https://www.eclipse.org/contribute/">How to Contribute</a></li>
                          <li><a href="https://www.eclipse.org/ide/">IDE and Tools</a></li>
                          <li><a href="https://www.eclipse.org/forums/index.php/f/89/">Newcomer Forum</a></li>
                        </ul>
                      </div>
                    </div>
                  </li>
                </ul>
              </li>
            </ul>
          </div>
          <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-main-menu">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            </button>
            <div class="wrapper-logo-mobile"><a class="navbar-brand visible-xs" href="https://www.eclipse.org/"><img class="logo-eclipse-default-mobile img-responsive" alt="Eclipse.org logo" width="160" src="//www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg"/></a></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</header>
<section class="default-breadcrumbs hidden-print" id="breadcrumb">
  <div class="container-fluid">
    <h3 class="sr-only">Breadcrumbs</h3>
    <div class="row">
      <div class="col-sm-24">
        <ol class="breadcrumb">
          <li><a href="https://www.eclipse.org/">Home</a></li>
          <li><a href="/Main_Page">Eclipse Wiki</a></li>
          <li class="active">EclipseLink/Examples/MOXy/EclipseLink-OXM.XML</li>
        </ol>
      </div>
    </div>
  </div>
</section>
<!-- /#breadcrumb -->
<main>
<div class="container-fluid padding-15 padding-top-20">
    
    
    <!-- content -->
    <section id="content" class="mw-body container-full clearfix 0">
      <div id="mw-js-message" style="display:none;"></div>

            <!-- sitenotice -->
      <div id="siteNotice"><div id="localNotice" lang="en" dir="ltr"><h2><span class="mw-headline" id="Notice:_This_Wiki_is_now_read_only_and_edits_are_no_longer_possible._Please_see:_https:.2F.2Fgitlab.eclipse.org.2Feclipsefdn.2Fhelpdesk.2F-.2Fwikis.2FWiki-shutdown-plan_for_the_plan.">Notice: This Wiki is now read only and edits are no longer possible.  Please see: <a rel="nofollow" class="external free" href="https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan">https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan</a> for the plan.</span></h2>
</div></div>
      <!-- /sitenotice -->
      
      <!-- bodyContent -->
      <div id="bodyContent">

        
                <!-- jumpto -->
        <div id="jump-to-nav" class="mw-jump">
          Jump to: <a href="#mw-head">navigation</a>,
          <a href="#p-search">search</a>
        </div>
        <!-- /jumpto -->
        
          <!-- leftcol -->
          <aside class="col-md-4 noprint hidden-print" id="leftcol">
                      <form class="input-group" role="form" id="form-eclipse-search" action="/index.php" id="searchform">
              <input id="searchInput" class="search-query form-control" type="search" accesskey="f" title="Special:Search" placeholder="Search" name="search" value="">

              <span class="input-group-btn">
                <button value="search" id="mw-searchButton" type="submit" class="btn btn-default" title="Search the pages for this text" name="fulltext">
                  <i class="fa fa-search"></i>
                </button>
              </span>
            </form>
                      <select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Navigation---</span></option><option value="/Main_Page">Main Page</option><option value="/Eclipsepedia:Community_portal">Community portal</option><option value="/Eclipsepedia:Current_events">Current events</option><option value="/Special:RecentChanges">Recent changes</option><option value="/Special:Random">Random page</option><option value="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents">Help</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Navigation</span></li>                <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Main_Page" id="n-mainpage" title="Visit the main page [z]" accesskey="z">Main Page</a></li>                <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Eclipsepedia:Community_portal" id="n-portal" title="About the project, what you can do, where to find things">Community portal</a></li>                <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Eclipsepedia:Current_events" id="n-currentevents" title="Find background information on current events">Current events</a></li>                <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Special:RecentChanges" id="n-recentchanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li>                <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Special:Random" id="n-randompage" title="Load a random page [x]" accesskey="x">Random page</a></li>                <li class=""><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents" id="n-help" title="The place to find out">Help</a></li></ul>            <select class="form-control margin-top-10 margin-bottom-10 visible-xs visible-sm" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);"><option class="fw-700 "><span class="fw-700">---Toolbox---</span></option><option value="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;action=info">Page information</option><option value="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;oldid=254162">Permanent link</option><option value="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;printable=yes">Printable version</option><option value="/Special:SpecialPages">Special pages</option><option value="/Special:RecentChangesLinked/EclipseLink/Examples/MOXy/EclipseLink-OXM.XML">Related changes</option><option value="/Special:WhatLinksHere/EclipseLink/Examples/MOXy/EclipseLink-OXM.XML">What links here</option></select><ul class="ul-left-nav fa-ul hidden-print leftnav hidden-xs hidden-sm"><li class="separator"><span class="separator">Toolbox</span></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;action=info" id="t-info" title="More information about this page">Page information</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;oldid=254162" id="t-permalink" title="Permanent link to this revision of the page">Permanent link</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;printable=yes" id="t-print" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Special:SpecialPages" id="t-specialpages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Special:RecentChangesLinked/EclipseLink/Examples/MOXy/EclipseLink-OXM.XML" id="t-recentchangeslinked" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li><i class="fa fa-angle-double-right orange fa-fw"></i> <a href="/Special:WhatLinksHere/EclipseLink/Examples/MOXy/EclipseLink-OXM.XML" id="t-whatlinkshere" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li></ul>                                  </aside>
          <!-- /leftcol -->

          <!-- mainContent -->
          <div id="mainContent" class="col-md-20">
                      <ul class="nav nav-tabs noprint hidden-print" role="tablist">
                       <li id="ca-nstab-main" class="active"><a href="/EclipseLink/Examples/MOXy/EclipseLink-OXM.XML"  title="View the content page [c]" accesskey="c" tabindex="-1">Page</a></li>
                        <li id="ca-talk" class="new"><a href="/index.php?title=Talk:EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;action=edit&amp;redlink=1"  title="Discussion about the content page [t]" accesskey="t" tabindex="-1">Discussion</a></li>
                        <li id="ca-viewsource"><a href="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;action=edit"  title="This page is protected.&#10;You can view its source [e]" accesskey="e" tabindex="-1">View source</a></li>
                        <li id="ca-history" class="collapsible"><a href="/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;action=history"  title="Past revisions of this page [h]" accesskey="h" tabindex="-1">History</a></li>
                      </ul>            <div class="tab-content background-white">
              <div id="tab-pane-main-page-content" class="tab-pane active">

                
                <h1 id="firstHeading" class="firstHeading page-header">
                  <span dir="auto">EclipseLink/Examples/MOXy/EclipseLink-OXM.XML</span>
                </h1>
                <div id="main-page-content">
                                                      <!-- subtitle -->
                  <div id="contentSub"  class="alert alert-small alert-warning"><span class="subpages">&lt; <a href="/EclipseLink" title="EclipseLink">EclipseLink</a>&lrm; | <a href="/EclipseLink/Examples" title="EclipseLink/Examples">Examples</a>&lrm; | <a href="/EclipseLink/Examples/MOXy" title="EclipseLink/Examples/MOXy">MOXy</a></span></div>
                  <!-- /subtitle -->
                  
                  
                  <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p><br />
In addition to using Java annotations, EclipseLink provides an XML mapping configuration file called <b>eclipselink-oxm.xml</b>. This mapping file can be used in place of or to override JAXB annotations in source.  In addition to allowing all of the standard JAXB mapping capabilities it also includes advanced mapping types and options.
</p><p><b>Note: Usage of this mapping file will enable many advanced features but may prevent the persistence unit from being portable to other JAXB implementations</b>
</p>
<div id="toc" class="toc"><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="#XML_Configuration"><span class="tocnumber">1</span> <span class="toctext">XML Configuration</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Configuring_usage_in_JAXBContext"><span class="tocnumber">2</span> <span class="toctext">Configuring usage in JAXBContext</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Example_using_eclipselink-oxm.xml"><span class="tocnumber">3</span> <span class="toctext">Example using eclipselink-oxm.xml</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="#EclipseLink_OXM_Features"><span class="tocnumber">4</span> <span class="toctext">EclipseLink OXM Features</span></a></li>
</ul>
</div>

<h2><span class="mw-headline" id="XML_Configuration">XML Configuration</span></h2>
<p>The <a rel="nofollow" class="external text" href="http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/moxy/org.eclipse.persistence.moxy/resource/org/eclipse/persistence/jaxb/eclipselink_oxm_2_3.xsd">EclipseLink OXM schema (eclipselink_oxm_2_3.xsd)</a> can be used with the following header to define JAXB and EclipseLink's advanced mappings.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;xml-bindings</span></span>
<span class="sc3">	<span class="re0">xmlns</span>=<span class="st0">&quot;http://www.eclipse.org/eclipselink/xsds/persistence/oxm&quot;</span></span>
<span class="sc3">	<span class="re0">xmlns:xsi</span>=<span class="st0">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span class="sc3">	<span class="re0">xsi:schemaLocation</span>=<span class="st0">&quot;http://www.eclipse.org/eclipselink/xsds/persistence/oxm http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_3.xsd&quot;</span></span>
<span class="sc3">	<span class="re0">version</span>=<span class="st0">&quot;2.3&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/xml-bindings<span class="re2">&gt;</span></span></span></pre></div></div>
<p>EclipseLink automatically resolves the xmlns="<a rel="nofollow" class="external free" href="http://www.eclipse.org/eclipselink/xsds/persistence/oxm">http://www.eclipse.org/eclipselink/xsds/persistence/oxm</a>" to its internally packaged schema. The following header will not cause the parser to attempt to access the XSD from the web. Using this however will require you to add the eclipselink_oxm_2_3.xsd to your IDE's catalog in order to have XML completion available.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="xml source-xml"><pre class="de1"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">?&gt;</span></span>
<span class="sc3"><span class="re1">&lt;xml-bindings</span></span>
<span class="sc3">	<span class="re0">xmlns</span>=<span class="st0">&quot;http://www.eclipse.org/eclipselink/xsds/persistence/oxm&quot;</span></span>
<span class="sc3">	<span class="re0">xmlns:xsi</span>=<span class="st0">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span class="sc3">	<span class="re0">version</span>=<span class="st0">&quot;2.3&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;/xml-bindings<span class="re2">&gt;</span></span></span></pre></div></div>
<h2><span class="mw-headline" id="Configuring_usage_in_JAXBContext">Configuring usage in JAXBContext</span></h2>
<p>A JAXBContext can use one of these mapping files per Java package.  The mapping files are passed to the JAXBContext through the properties parameter.
</p><p>Specify the externalized metadata:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="java source-java"><pre class="de1">Map<span class="sy0">&lt;</span><span class="kw3">String</span>, Source<span class="sy0">&gt;</span> metadata <span class="sy0">=</span> <span class="kw1">new</span> HashMap<span class="sy0">&lt;</span><span class="kw3">String</span>,Source<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
metadata.<span class="me1">put</span><span class="br0">&#40;</span><span class="st0">&quot;example.order&quot;</span>, <span class="kw1">new</span> StreamSource<span class="br0">&#40;</span><span class="st0">&quot;order-metadata.xml&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
metadata.<span class="me1">put</span><span class="br0">&#40;</span><span class="st0">&quot;example.customer&quot;</span>, <span class="kw1">new</span> StreamSource<span class="br0">&#40;</span><span class="st0">&quot;customer-metadata.xml&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>
<p>Create the properties object to pass to the JAXBContext:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="java source-java"><pre class="de1">Map<span class="sy0">&lt;</span><span class="kw3">String</span>,Object<span class="sy0">&gt;</span> properties <span class="sy0">=</span> <span class="kw1">new</span> HashMap<span class="sy0">&lt;</span><span class="kw3">String</span>,Object<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
properties.<span class="me1">put</span><span class="br0">&#40;</span>JAXBContextFactory.<span class="me1">ECLIPSELINK_OXM_XML_KEY</span>, metadata<span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>
<p>Create the JAXBContext:
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="java source-java"><pre class="de1">JAXBContext.<span class="me1">newInstance</span><span class="br0">&#40;</span><span class="st0">&quot;example.order:example.customer&quot;</span>, aClassLoader, properties<span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>
<p>To specify the EclipseLink MOXy JAXB implementation you need to have a jaxb.properites with the following entry in at least one of the packages.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="text source-text"><pre class="de1">javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory</pre></div></div>
<h2><span class="mw-headline" id="Example_using_eclipselink-oxm.xml">Example using eclipselink-oxm.xml</span></h2>
<p>The <a href="/EclipseLink/Examples/MOXy/GettingStarted/ExternalizedMetadata" title="EclipseLink/Examples/MOXy/GettingStarted/ExternalizedMetadata"> Customer JAXB Example using XML metadata</a> illustrates how XML can be used exclusively (no annotations) to configure JAXB usage. This example includes the usage of this EclipseLink specific JAXB mapping XML file.
</p>
<h1><span class="mw-headline" id="EclipseLink_OXM_Features">EclipseLink OXM Features</span></h1>
<p>In addition to supporting all capabilities of JAXB's annotations with similarly named elements and attributes the EclipseLink mapping file also offers many additional configuration capabilities.
</p>
<!-- 
NewPP limit report
Cached time: 20240526215521
Cache expiry: 86400
Dynamic content: false
CPU time usage: 0.132 seconds
Real time usage: 0.130 seconds
Preprocessor visited node count: 69/1000000
Preprocessor generated node count: 140/1000000
Post‐expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Highest expansion depth: 2/40
Expensive parser function count: 0/100
-->

<!-- 
Transclusion expansion time report (%,ms,calls,template)
100.00%    0.000      1 - -total
-->

<!-- Saved in parser cache with key my_wiki:pcache:idhash:25816-0!*!0!!en!*!* and timestamp 20240526215521 and revision id 254162
 -->
</div>
                                      <!-- catlinks -->
                    <div id='catlinks' class='catlinks'><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/Special:Categories" title="Special:Categories">Category</a>: <ul><li><a href="/Category:EclipseLink/Examples/MOXy" title="Category:EclipseLink/Examples/MOXy">EclipseLink/Examples/MOXy</a></li></ul></div></div>                     <!-- /catlinks -->
                                  </div>
              </div>
            </div>
          </div>
        <!-- /maincontent -->

                <!-- printfooter -->
        <div class="printfooter">
        Retrieved from "<a dir="ltr" href="https://wiki.eclipse.org/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;oldid=254162">https://wiki.eclipse.org/index.php?title=EclipseLink/Examples/MOXy/EclipseLink-OXM.XML&amp;oldid=254162</a>"        </div>
        <!-- /printfooter -->
        
        
        <!-- debughtml -->
                <!-- /debughtml -->

      </div>
      <!-- /bodyContent -->
    </section>
    <!-- /content -->

    <!-- footer -->
    
</div>
<div class="featured-footer featured-footer-newsletter background-secondary">
  <div class="container">
    <p id="footercredit">This page was last modified 14:17, 6 June 2011 by Eclipsepedia anonymous user <a href="/Special:Contributions/Unnamed_Poltroon" title="Special:Contributions/Unnamed Poltroon">Unnamed Poltroon</a>.</p><p id="footerviews"></p>  </div>
</div>
</main> <!-- /#main-content-container-row -->
<p id="back-to-top" class="noprint hidden-print">
  <a class="visible-xs" href="#top">Back to the top</a>
</p>
<footer id="solstice-footer">
  <div class="container">
    <div class="row">
      <section class="col-sm-6 hidden-print" id="footer-eclipse-foundation">
        <h2 class="section-title">Eclipse Foundation</h2>
        <ul class="nav">
          <li><a href="https://www.eclipse.org/org/">About Us</a></li>
          <li><a href="https://www.eclipse.org/org/foundation/contact.php">Contact Us</a></li>
          <li><a href="https://www.eclipse.org/donate">Donate</a></li>
          <li><a href="https://www.eclipse.org/membership/">Members</a></li>
          <li><a href="https://www.eclipse.org/org/documents/">Governance</a></li>
          <li><a href="https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php">Code of Conduct</a></li>
          <li><a href="https://www.eclipse.org/artwork/">Logo and Artwork</a></li>
          <li><a href="https://www.eclipse.org/org/foundation/directors.php">Board of Directors</a></li>
        </ul>
      </section>
      <section class="col-sm-6 hidden-print" id="footer-legal">
        <h2 class="section-title">Legal</h2>
        <ul class="nav">
          <li><a href="https://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
          <li><a href="https://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
          <li><a href="https://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
          <li><a href="https://www.eclipse.org/legal/epl-2.0/">Eclipse Public License</a></li>
          <li><a href="https://www.eclipse.org/legal/">Legal Resources</a></li>
        </ul>
      </section>
      <section class="col-sm-6 hidden-print" id="footer-useful-links">
        <h2 class="section-title">Useful Links</h2>
        <ul class="nav">
          <li><a href="https://bugs.eclipse.org/bugs/">Report a Bug</a></li>
          <li><a href="//help.eclipse.org/">Documentation</a></li>
          <li><a href="https://www.eclipse.org/contribute/">How to Contribute</a></li>
          <li><a href="https://www.eclipse.org/mail/">Mailing Lists</a></li>
          <li><a href="https://www.eclipse.org/forums/">Forums</a></li>
          <li><a href="//marketplace.eclipse.org">Marketplace</a></li>
        </ul>
      </section>
      <section class="col-sm-6 hidden-print" id="footer-other">
        <h2 class="section-title">Other</h2>
        <ul class="nav">
          <li><a href="https://www.eclipse.org/ide/">IDE and Tools</a></li>
          <li><a href="https://www.eclipse.org/projects">Projects</a></li>
          <li><a href="https://www.eclipse.org/org/workinggroups/">Working Groups</a></li>
          <li><a href="https://www.eclipse.org/org/research/">Research@Eclipse</a></li>
          <li><a href="https://www.eclipse.org/security/">Report a Vulnerability</a></li>
          <li><a href="https://status.eclipse.org">Service Status</a></li>
        </ul>
      </section>
      <div class="col-sm-24 margin-top-20">
        <div class="row">
          <div id="copyright" class="col-md-16">
            <p id="copyright-text">Copyright &copy; Eclipse Foundation, Inc. All Rights Reserved.</p>
          </div>
          <div class="col-md-8 social-media">
            <ul class="list-inline">
              <li>
                <a class="social-media-link fa-stack fa-lg" href="https://twitter.com/EclipseFdn">
                <i class="fa fa-circle-thin fa-stack-2x"></i>
                <i class="fa fa-twitter fa-stack-1x"></i>
                </a>
              </li>
              <li>
                <a class="social-media-link fa-stack fa-lg" href="https://www.facebook.com/eclipse.org">
                <i class="fa fa-circle-thin fa-stack-2x"></i>
                <i class="fa fa-facebook fa-stack-1x"></i>
                </a>
              </li>
              <li>
                <a class="social-media-link fa-stack fa-lg" href="https://www.youtube.com/user/EclipseFdn">
                <i class="fa fa-circle-thin fa-stack-2x"></i>
                <i class="fa fa-youtube fa-stack-1x"></i>
                </a>
              </li>
              <li>
                <a class="social-media-link fa-stack fa-lg" href="https://www.linkedin.com/company/eclipse-foundation">
                <i class="fa fa-circle-thin fa-stack-2x"></i>
                <i class="fa fa-linkedin fa-stack-1x"></i>
                </a>
              </li>
            </ul>
          </div>
        </div>
      </div>
      <a href="#" class="scrollup">Back to the top</a>
    </div>
  </div>
</footer>
    <!-- /footer -->
    <script>window.RLQ = window.RLQ || []; window.RLQ.push( function () {
mw.loader.state({"skins.solstice":"loading","user":"ready","user.groups":"ready"});mw.loader.load("/load.php?debug=false\u0026lang=en\u0026modules=skins.solstice\u0026only=scripts\u0026skin=solstice");mw.loader.load(["mediawiki.toc","mediawiki.action.view.postEdit","site","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest"]);
} );</script><script>window.RLQ = window.RLQ || []; window.RLQ.push( function () {
mw.config.set({"wgBackendResponseTime":395});
} );</script>  </body>
</html>
