An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!
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.