Reading XML nodes
As we progress through this chapter, we will be learning the different ways we can work with XML data. To organize the workflow, we will start by using the Step
action. The Step
action is like creating a block of actions that perform a complete step or task within your taskbot. Each step can be collapsed or expanded, which makes it easier for you to read and understand your actions. As with the If statements and loops, all the actions related to a step must be indented within the step they belon to.
There may be many instances where you need to look up a single value from your XML data stream, especially when the XML data is being used for reference purposes. We will continue to build on our walk-through by providing you with steps on how to read a specific single node, as well as multiple nodes, from our XML file.
Reading a single node
Our sample XML file contains five records of books. To read a single node, we must specify which record we wish to read...