This examples shows how to use async XML flat, keep in mind when using async the parent_id attribute of the returned top nodes on each request should be omitted or set to 0.
01.
$(
function
() {
02.
$(
"#xml_f"
).tree({
03.
languages : [
"en"
,
"bg"
],
04.
data : {
05.
type :
"xml_flat"
,
06.
async :
true
,
07.
opts : {
08.
url :
"async_xml_flat_data.xml"
09.
}
10.
}
11.
});
12.
});
1.
<
input
type
=
"button"
onclick
=
"$.tree.focused().set_lang("
en");"
value
=
"English"
>
2.
<
input
type
=
"button"
onclick
=
"$.tree.reference("
#xml_f").set_lang("bg");"
value
=
"Български"
>