Demonstrates the usage of the XML nodes.
It reads from an XML file describing books that were written by or about George W. Bush. The books are categorized. The workflow extracts all information such as ISBN, author, title, etc. and groups the books by category. The output file is (again) an xml file but in a different format (grouped by year).
Then in the first snippet, author and title are attributes of <book> and you would reference them as
/book/@author
/book/@title
whereas in the second snippet, author and title are elements within <book> and you would reference them as
/book/author
/book/title
In the workflow, you can see that “year” is an attribute of <book> as it appears inside <book title=xxxx > whereas <author> and <title> are elements in their own right:
<?xml version="1.0" encoding="UTF-8"?>
<book year="2001"> <!-- year is an attribute -->
<author>Vincent Bugliosi</author>
<title>The Betrayal of America: How the Supreme Court Undermined the Constitution and Chose Our President</title>
<category>About Elections</category>
<isbn>1-56025-355-X</isbn>
</book>