If you have version 4.1 of Eggplant, you can use the new built-in support for XML trees. Here’s how you could read that URL and parse it:
put url "http://www.w3schools.com/xml/simple.xml" as tree into breakfast
This creates a SenseTalk tree structure containing the XML data. Then you can access items within the data in various ways:
put item 1 of breakfast
put the text of node "food/name" of breakfast
put all nodes "food/name" of breakfast
See Chapter 16 of the SenseTalk Reference manual (Working with Trees and XML) for full details.
To access XML from a file instead of a URL, replace the url expression in the top example with a file expression instead. That will work fine for a local file on the Eggplant machine. For a file on the SUT, the best (simplest) option is usually to mount the SUT’s file system on the Mac through file sharing (SMB on Windows). Then you can treat the file just the same as if it were a local file.
If that’s not possible, you’ll have to do something a bit more challenging, like script Eggplant to open the file in a text editor on the SUT, copy the data to the clipboard, and use the remoteClipboard() function to access the text. There’s usually a way to get what you need, but sometimes it’s not obvious.