Aalto StAX Parsing: Reading XML Attribute
Overview This article demonstrates how to read the attributes of an XML element using Aalto StAX parser. Create employee.xml as shown below. Note the attribute name ‘id’ with value ‘1’ (see line 1 below) Create TestReadAttribute as shown below. Note that start element is obtained by using the StAX API (see lines 20-28 below). The … Read more