I have program for reading XML file. Recently my supplier changed some part of the source XML file and I have no idea how to read the changed parts.
XML :
<Product>
<Weight>5,000</Weight>
<Color>blue</Color>
<Stock Warehouse_name="London" Availability="5,00"/>
<Stock Warehouse_name="Berlin" Availability="0,00"/>
<Stock Warehouse_name="Sydney" Availability="42,00"/>
</Product>
Maybe you see my problem already. Weight and Color are OK, but the Stock is my problem. Instead to give the information between the elements, the information is direct in the element. I'm using the standard method to retrieve the data:
color = (eElement.getElementsByTagName("Color").item(0).getTextContent());
Any suggestion? I'm pretty new to Java, so please explain it to me as simple, as possible.