XML representation

A resource is represented as an XML element which contains the values of the resource (if any) with child elements to represent the sub resources. An XML representation of a resource is used in both the request payload and in the response.

The XML attribute, "xmlns" is mentioned in the representation. This attribute has the name of the YANG module of the resource specified in the representation.

For example, the below XML representation is for the interface "ethernet" resource which contain the child list element route-map "policy" as sub-resources.

<Ethernet xmlns="http://brocade.com/ns/rest/brocade-interface">
  <name>2/12</name>
    ...
    ...
    ...
    <ip xmlns="http://brocade.com/ns/rest/brocade-ip-policy">
    <policy>
      <route-map>
        <route-map-name>testmap</route-map-name>
      </route-map>
    </policy>
  </ip>
  ...
  ...
</Ethernet>

The utf-8 character set is used for the XML message encoding. A message is encoded for the following special characters.

Special Character Encoded Character Description of the Special character
< &lt; less than
> &gt; greater than
& &amp; ampersand
' &apos; apostrophe
" &quot; quotation mark