5.4.4 Execution Result of the Sample Program (SampleDOM.java)

The execution result of this sample program is output to the standard output and SampleDOM.xml.

Content of the standard output:

$ The total is 315000 yen.

Content output to SampleDOM.xml:

<?xml version="1.0" encoding="Shift_JIS"?>
<Payment_Slip>
<Merchandise>
<Brand_Name>Television</Brand_Name>
<Unit_Price>15000</Unit_Price>
<Amount>14</Amount>
</Merchandise>
<Merchandise>
<Brand_Name>Radio</Brand_Name>
<Unit_Price>3500</Unit_Price>
<Amount>6</Amount>
</Merchandise>
<Merchandise>
<Brand_Name>Video</Brand_Name>
<Unit_Price>21000</Unit_Price>
<Amount>4</Amount>
</Merchandise>
</Payment_Slip>