Skip Headers

# XPath by Path and Name

Previous

Next

In an XML document, attributes and elements are uniquely identified by a combination of name and path. Figure: Mapping to an XML Document by Path and Name illustrates that TopLink XML mappings can uniquely identify an XML element by name and path using an XPath such as `item/name/text()`. TopLink does not require a formal object relationship between XML elements `lines` and `item`.

Other XML technologies force you to provide an object relationship for every level of nesting, resulting in the inclusion of many XML elements and classes simply to organize the data to satisfy this restriction. This produces an unnecessarily large object model that does not properly reflect the domain space.

Mapping to an XML Document by Path and Name

Description of "Mapping to an XML Document by Path and Name"