MSI Factory 2.3

XML.GetElementNames

XML.GetElementNames

This is the first topic This is the last topic  

XML.GetElementNames

This is the first topic This is the last topic  

OverviewExamples

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, false);

 

-- 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" and shows them in a dialog message.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us