If your opening tag has the name Product
, than the corresponding closing tag must be Product
for it to be valid xml. Therefor you need to change
if(elementName.equals("product"))
to
if(elementName.equals("Product"))
^
if you want to see your desired behaviour.