I don't think the examples are very clear. I have an XML file that's on my server (remote). I want a simple DropDownList that loads it, with no templates (for now). I can't get it to work, and no errors are being thrown. Please I would really appreciate a simple example that does this.
$("#accounts").kendoDropDownList({
index: 0,
dataTextField: "title",
dataValueField: "title",
filter: "contains",
dataSource: {
type: "xml",
severFiltering: false,
serverPaging: false,
pageSize: 20,
transport: {
read: "GetData.xml"
},
schema: {
// specify the the schema is XML
type: "xml",
// the XML element which represents a single data record
data: "/books/book",
// define the model - the object which will represent a single data record
model: {
// configure the fields of the object
fields: {
// the "title" field is mapped to the text of the "title" XML element
title: "title/text()",
// the "author" field is mapped to the text of the "author" XML element
author: "author/text()",
// the "url" field is mapped to the text of the "url" XML element
url: "url/text()",
// the "cover" field is mapped to the "id" attribute of the "book" XML element
cover: "@@cover"
}
}
}
}
});
</script>