Skip Headers

# Self XPath

Previous

Next

For composite relationships, TopLink XML mappings can place data in the parent's element rather than an element nested within it given the self XPath (`"."`).

Figure: Mapping to a XML Document Using Self XPath illustrates mapping to an XML document using the self XPath.

Mapping to a XML Document Using Self XPath

Description of "Mapping to a XML Document Using Self XPath"

Note that in the preceding example represented by Figure: Mapping to a XML Document Using Self XPath, `name` attribute of the `Employee` class is mapped using the `@name` annotation.

Using the self XPath, you can make TopLink perform all read and write operations in the parent's element and not an element nested within it (see "Mappings and the jaxb:class Customization").