January 17, 2025

WebService API data source: rules for XML

This post assumes you have configured a WebService API data source.

 

Here are the rules required for your XML to be used in a List and Search:

 

  1. The API URL should not contain “<id>”
  2. Your API must return (or use xsl) XML in a collection as pictured below. The names of the elements are not important, as long as the data is structured in a list of <item></item> as an example.

XpressDox can read data from a web service

  1. Each element in the collection can have the following attributes:

 

“identifier”, “caption” and “visible”

 

“identifier”
This is the ID of the record, and only one element has an identifier=”True” attribute. It will be used to fetch the full record.

 

XpressDox can read data from a web service

 

“visible”
Although all data is returned, only certain elements can be made visible to users in a Search interface (known as ListAndSearch). Use visible=”True” or visible=”False” to determine whether you want to display this element to users in the interview.

XpressDox can read data from a web service

 

“caption”
The element name can be made into a friendlier name for the user using the caption attribute.

XpressDox can read data from a web service

 

 

Transforming your XML

Should your data structure need to change, you can use XSLT to transform it. This online tool allows for developing and testing.