We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
My attempt to read the file looks like this:
<?xml version="1.0"?> <Email> <Subject>3 events scheduled starting 3/13 1:30 PM: Job 1034</Subject> <DeptID>111</DeptID> <sPersonIDs>10240; 175</sPersonIDs> <MessageText>3/11, 3/12, 3/13 1:30 - 5:00 PM Water Damage Assigned to: Bilbo Baggins</MessageText> </Email>
Apparently I'm missing something important since I'm not getting any values back out of my file. This is my first time working with IXMLDocument/IXMLNode, so happy for any guidance. Thanks.
procedure TChronEmail.GetFromTempFile; var i:integer; sFile : string; Doc: IXMLDocument; Email: IXMLNode; begin sFile := [filename--I've tested that it is valid and that it is there]; if fileExists(sFile) then begin Doc.LoadFromFile(sFile); i := 0; // for this test, only need the first entry in the file Email := DOC.ChildNodes.Nodes['Email'].ChildNodes[i]; Subject := Email.ChildNodes['Subject'].Text; if tryStrToInt(Email.ChildNodes['DeptID'].Text, i) then DeptID := i; sPersonIDs := Email.ChildNodes['sPersonIDs'].Text; MessageText := Email.ChildNodes['MessageText'].Text;
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.