I have got two problems with using xml.
First Problem:
This code working correct. If argument have only one child but not list of childs.
doc.getDocumentElement().getChildNodes().item(t).getLastChild().getNodeValue()
I would like to prepare something like this:
If(doc.getDocumentElement().getChildNodes().item(t).getLastChild().getNodeValue() !=null)
but this doesn’t work because value is never empty but I need similar If which can check is list of value or not.
Normal Node:
<name>Adam</name>
List Node:
<car>
<tire>yes</tire>
<trunk>yes</trunk>
</car>
Second Problem:
If I make nested ChildNodes I`m not able to take value do you know where is a problem?
Example of node:
<name>Adam</name>
If I wrire this I get “name”
doc.getDocumentElement().getChildNodes().item(t).getChildNodes().item(m).getNodeName()
If I will write this I will get null but I need “Adam”
doc.getDocumentElement().getChildNodes().item(t).getChildNodes().item(m).getNodeName()
answer – I should use ToLenght() > 1