The X-definition below describes the root XML element "Inventory", which contains "Book" elements. Each element "Book" must have an "ISBN" attribute corresponding to the pattern and may optionally contain the year of publication. The "Book" element may contain multiple "Author" Elements and must contain the "Title" element. The information about ISBN codes, number of books, and errors is printed on the system output.
The input data shows the use of this definition with two books, where one has multiple authors and the other has only the title.
Note XML allows to use of both " and ' characters as a delimiter of attribute value you can reverse usage of them (you can try it here).

X-definition
Input data
 You can edit both X-definition and/or Input data