XML.GetElementNames

table XML.GetElementNames (

string XMLPath,

boolean FullPaths = false

boolean IncludeIndices = false )

Example 1

-- This example assumes the sample XML is already loaded into memory.

-- Return the names of all of the child elements of address_info.
tbChild_elements = XML.GetElementNames("database/customer/address_info", false, true);

-- Perform some error checking.
error = Application.GetLastError();
-- If no errors occurred...
if (error == 0) then
if (tbChild_elements ~= nil) then

-- Convert the table to a return/newline delimited string to display in a dialog.
strChild_elements = Table.Concat(tbChild_elements, "\r\n", 1, TABLE_ALL);

-- Display a dialog message containing all child names.
Dialog.Message("Child Element Names", strChild_elements);
end
else
Dialog.Message("Error", _tblErrorMessages[error]);
end

Gets the names of all of the child elements of "addresss_info" including indices and shows them in a dialog message.

See also: Related Actions