w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Java DOM parsing of XML- can't get attributes from child-child nodes

NodeList sublist = node.getChildNodes(); assigns to sublist children, it means that there are assigned nodes: Birth, Causes. The Causes node contains list of children, so if your finNode is Birth element you can get Egt attr, but if finNode is Causes you have to get children and then you can read Code and Desc from each children of 'Causes'.

For checking name of element you can use fin.getTagName()





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.