I need to read an XML Document to retrieve an element from it. In my case I need to get the Identifier from an xml doc. Here's my current code, how can I Then find this data?
recManufacturingSetup.FINDFIRST;
objFiles.RESET;
IF 1 = 1 THEN;
objFiles.SETFILTER(Path, '%1', recManufacturingSetup.AegisFolderPackoutRoot);
objFiles.SETFILTER(Name, '@*xml');
objFiles.SETRANGE("Is a file", TRUE);
IF objFiles.FINDSET(FALSE, FALSE) THEN REPEAT
recAegisPackoutImport.Filename := objFiles.Name;
IF recAegisPackoutImport.FINDLAST THEN
recAegisPackoutImport."Line No." := recAegisPackoutImport."Line No." + 1
ELSE
recAegisPackoutImport."Line No." := 1;
recAegisPackoutImport.INSERT;
UNTIL objFiles.NEXT = 0;
//Get file names from table and remove end tags
IF recAegisPackoutImport.FINDSET THEN REPEAT
PackoutFileName :=
COPYSTR(recAegisPackoutImport.Filename,1,12);
//Check Whse Serial Batch List for existing Serial No.
whseSerialBatchList.RESET;
whseSerialBatchList.SETRANGE("No.", PackoutFileName);
IF whseSerialBatchList.FINDFIRST THEN BEGIN
CLEAR(xmlDoc);
xmlDoc := xmlDoc.XmlDocument();
xmlDoc.Load(recAegispackoutImport."Folder Path" + recAegisPackoutImport.Filename);
xmlRoot := xmlDoc.DocumentElement();
xmlNodeListPackoutData := xmlDoc.GetElementsByTagName('PackoutBox'); //lew
xmlNodePackoutData := xmlNodeListPackoutData.Item(intNode);
xmlDoc.ReadNode(XmlReader reader)
END;
UNTIL recAegisPackoutImport.NEXT =0;
*This post is locked for comments