Show TOC

Binding Path Syntax for XML ModelsLocate this document in the navigation structure

XML models differentiate between attributes and content. XML has no arrays and defines lists as multiple elements with the same name instead. This makes the binding path syntax for XML models more difficult than for JSON or OData models.

For attributes, a special selector using the "@" character exists and "text()" can be used to reference the content text of an element. Lists are referenced by using the path to the multiple element.

Note For the XML model the root must not be included in the path.
  <company name="Treefish Inc">
    <contact phone="873">Barbara</contact>
    <contact phone="734">Gerry</contact>
    <contact phone="275">Susan</contact>

Absolute binding paths within this model:


Relative binding paths within the /company context:


Relative binding paths within an aggregation binding of /company/contact:

Note In a similar JSON model you would use /companies/company/locations as binding path for the locations collection. In an XML model the respective collection binding path is: /company/locations/location.