Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Configuring XPath

TopLink uses XPath statements to map the attributes of a Java object to locations in an XML document. When you create an XML mapping or EIS mapping using XML records, you can specify the XPath based on any of the following:

Table 35-5 summarizes which mappings support this option.

Footnote 1 When used with XML records only (see "Configuring Record Format").

Footnote 2 Supports the self XPath (".") so that the TopLink runtime performs all read and write operations in the parent's element and not an element nested within it (see "Mappings and the jaxb:class Customization").

Before you can select an XPath for a mapping, you must associate the descriptor with a schema context (see "Configuring Schema Context for an EIS Descriptor" or "Configuring Schema Context for an XML Descriptor").

For more information, see "Mappings and XPath".

Using TopLink Workbench

Use this table to select the XPath for an XMl mapping or EIS mapping using XML records:

  1. Select the mapped attribute in the Navigator. Its properties appear in the Editor.

  2. If necessary, click the General tab. The General tab appears.

    Figure 35-3 General Tab, XPath Options

    Description of Figure 35-3  follows
    Description of "Figure 35-3 General Tab, XPath Options"

    Figure 35-4 XPath Options for Composite Object Mappings

    Description of Figure 35-4  follows
    Description of "Figure 35-4 XPath Options for Composite Object Mappings"

Click Browse and select the XPath to map to this attribute (see "Choosing the XPath").

For an EIS composite object mapping using XML records or an XML composite object mapping, you can choose one of the following:

Choosing the XPath

From the Choose XPath dialog box, select the XPath and click OK. TopLink Workbench builds the complete XPath name.

Figure 35-5 Choose XPath Dialog Box

Choose Xpath dialog
Description of "Figure 35-5 Choose XPath Dialog Box"