In this tutorial we will show you how you can present the XML data (stored as page attachment) to your end users |
With ConfiDoc you can easily show the data from XML, JSON, CSV, RSS and SQL sources using the same approach an methods.
The structure of the XML is as follows:
<users> <user> <name>Sam Smith</name> <email>ss@domain.com</email> </user> <user> <name>John Doe</name> <email>jd@domain.com</email> </user> </users> |
We will show the data in a Table (using TableView macro) and then as a bulleted list (using ListView macro)
Showing as Table
Will add a TableView macro
A choose the attachment to be used as source:
We also specify a root element to use, so our "user" nodes will be used as an array of nodes
Then we add 2 fields
Referencing Fields: name and email
End result (Live view using ConfiDoc TableView)
|
Showing the same dataset as bulleted list using ListView macro
We also set the root element to be "users.user" in the ListView
And the final config looks like:
End result (Live view using ConfiDoc ListView macro)
- |
You can show the data from files attached to other pages, as long as the user has an access to the page where the attachment is stored |