AppML Tutorial
Estimated reading: 4 minutes 351 views

AppML Data Handling – Bind JSON, XML & SQL Data to HTML Easily


Introduction – Manage Data Easily with AppML

AppML is engineered to bind structured data like JSON, XML, text files, and SQL databases directly to HTML elements using a simple and declarative syntax. This eliminates the need for writing complex JavaScript or backend integration logic.

By connecting your web pages to real-time data sources, AppML enables dynamic, filterable, and sortable content viewsβ€”perfect for product listings, school dashboards, and admin panels.

With AppML, you can display, update, and interact with external data sources in real timeβ€”without writing any backend code.


What You’ll Learn in This Section

  • How AppML connects and binds dynamic data to HTML
  • The data file formats supported (JSON, XML, Text)
  • How to work with SQL databases using AppML
  • Syntax structure of AppML data files
  • How to filter and sort data directly within HTML views

Topics Covered

Topic Description
AppML – Working with DataLearn how to load, update, and display dynamic content using data files or databases.
AppML – Data Files: JSON, XML, TextUnderstand how to structure and integrate different types of external data sources.
AppML – Databases OverviewExplore how AppML communicates with backend databases like MySQL.
AppML – Using SQL DatabasesConnect HTML views to SQL results using AppML’s built-in data mapping.
AppML – AppML Datafiles FormatLearn the correct syntax and field structure required in AppML-readable files.
AppML – Data Filtering and SortingAdd instant filtering and sorting features to tables and lists directly in HTML.

AppML – Working with Data

AppML allows you to fetch data from external files using the appml-data attribute in HTML. Example:

<div appml-data="products.json">
  <h3>{{name}}</h3>
  <p>{{price}}</p>
</div>

This binds data fields like name and price from the JSON file and renders them automatically.


AppML – Data Files: JSON, XML, Text

AppML supports:

  • JSON: Most common for structured data
  • XML: Useful for SOAP-based APIs
  • Text: Plain data records in delimiter-separated format

Files should follow a schema where data is stored under the records array.


AppML – Databases Overview

AppML can also interface with backend SQL databases via AJAX calls. The backend (like PHP) fetches data and returns it in JSON format which AppML then renders dynamically.


AppML – Using SQL Databases

Example setup:

<div appml-data="get_data.php"></div>

Your get_data.php fetches data from MySQL and returns:

{
  "records": [
    { "id": 1, "name": "Laptop", "price": "$799" },
    ...
  ]
}

AppML takes care of rendering and updating the UI without any JS code.


AppML – AppML Datafiles Format

A valid AppML data file (JSON format) must look like this:

{
  "records": [
    { "name": "Item A", "price": "$50" },
    { "name": "Item B", "price": "$75" }
  ]
}

XML and text files must follow compatible formats with headers and value structures.


AppML – Data Filtering and Sorting

AppML lets you sort and filter views using simple HTML attributes like:

<input appml-filter="name">
<table>
  <tr appml-repeat="records">
    <td>{{name}}</td>
  </tr>
</table>

No JavaScript is needed for search or sorting behaviorβ€”AppML manages it.


Summary – Recap & Next Steps

AppML simplifies working with structured data by offering real-time binding between external files or databases and your HTML views. Whether you’re rendering tables, dashboards, or search results, AppML keeps your code minimal and maintainable.

Key Takeaways:

  • Supports JSON, XML, text, and SQL data integration
  • Auto-binds structured data into HTML
  • Enables filtering, sorting, and dynamic updates natively

Real-World Relevance:
Great for product listings, dashboards, and real-time reports where backend code should be minimized.


FAQs

What data file formats does AppML support?
JSON, XML, and plain text filesβ€”each structured for tabular data rendering.

Can AppML fetch data from a database directly?
Not directly, but you can use server scripts (like PHP) to return SQL results as JSON.

How can I add search functionality with AppML?
Use appml-filter attributes on input elements. AppML handles filtering automatically.


Share Now :
Share

πŸ“¦ AppML Data Handling

Or Copy Link

CONTENTS
Scroll to Top