WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

AppML Reference - Data Files


The "information" Property

The "information" property characterizes an information record as the information source. It has the following sub properties:

Element Description
"type" The kind of information document ("csvfile", "xmlfile", or "jsonfile")
"filename" The name of the record
"record" The name of the XML information hub (if xmlfile)
"items" The information items

Data From a Text File

This show brings records containing Title, Artist, and Price (as thing 1, 2, furthermore, 5) from a comma isolated content record:

Model

{
"data": {
    "type"    : "csvfile",
    "filename": "cd_catalog.txt",
    "items"   : [
        {"name": "Title", "list": 1},
        {"name": "Artist","index": 2},
        {"name": "Value", "list": 5}
    ]
}
}

Example clarified: Case Text Files.


Data From a XML File

This demonstrate brings records containing Title, Artist, and Price from CD hubs in a XML document:

Model

{
"data": {
    "type"    : "xmlfile",
    "filename": "cd_catalog.xml",
    "record"  : "CD",
    "items"   : [
        {"name": "Craftsman", "nodename": "ARTIST"},
        {"name": "Title",  "nodename": "TITLE"},
        {"name": "Country","nodename": "COUNTRY"}
    ]
}
}

Example clarified: Case XML Files.


Data From a JSON File

This demonstrate gets records containing Title, Artist, and Price from an exhibit of CD objects in a JSON document:

Model

{
"data" : {
    "type" : "jsonfile",
    "filename" : "cd_catalog.js",
    "record" : "cd",
    "things" : [
        {"name" : "Title", "nodename" : "title"},
        {"name" : "Craftsman", "nodename" : "artist"},
        {"name" : "Cost", "nodename" : "price"}
    ]
}
}

Example clarified: Case JSON Files.