2.5.        Interact with Databases

We are going to save the literature information into an XML file database including the AbstractURL, Title, Author, and Abstract variables.  Right-click on the 6th action ˇ°Abstract: ***ˇ±, and select the ˇ°Save Variable ˇ­ˇ± menu item, it shows:

Click on the [Create a save variable action], it shows:

Select the ˇ°XML fileˇ± from the ˇ°target type: [Database]ˇ± drop-down list, enter ˇ°saved-abstracts.txtˇ± in the ˇ°Save to file: [ ]ˇ± input box (it will appear once the ˇ°XML fileˇ± is selected), and click the ˇ°Addˇ± following the ˇ°Save Variables:ˇ±.  It shows:

Enter ˇ°AbstractURLˇ± in both the ˇ°TargetFieldˇ± and the ˇ°Expressionˇ± boxes, click ˇ°Addˇ±;

Enter ˇ°Titleˇ± in both the ˇ°TargetFieldˇ± and the ˇ°Expressionˇ± boxes, click ˇ°Addˇ±;

Enter ˇ°Authorˇ± in both the ˇ°TargetFieldˇ± and the ˇ°Expressionˇ± boxes, click ˇ°Addˇ±;

Enter ˇ°Abstractˇ± in both the ˇ°TargetFieldˇ± and the ˇ°Expressionˇ± boxes, click [Update] button;

It shows:

Click [Return] and we are done.

 

Now run the robot, and open the ˇ°saved-abstracts.txtˇ± file from the IROBOT installation directory.  You can see the abstract information is saved correctly.