OverviewExamples
-- This example assumes the sample XML is already loaded into memory.
-- Gets the value in database/customer/first_name.
customer_name = XML.GetValue("database/customer/first_name");
-- If a value was returned, display it in a dialog message.
if (customer_name ~= "") then
Dialog.Message("Value","The customer's first name is "..customer_name);
else
Dialog.Message("Problem", "The customer name could not be located.");
end
Gets the value in "/database/customer/first_name" and shows it in a dialog message.
-- This example assumes the sample XML is already loaded into memory.
-- Gets the second customer's second phone number.
customer_phone = XML.GetValue("database/customer:2/phone:2");
-- If a value was returned, display it in a dialog message.
if (customer_phone ~= "") then
Dialog.Message("Value","The customer's second phone number is "..customer_phone);
else
Dialog.Message("Problem", "The telephone number could not be located.");
end
Gets the second customer's second phone number and shows it in a dialog message.
See also: Related Actions