How would you go about selecting the name of the first child node using VTD?
if I had the following, how would i select the node name (sodocumententry) so I can create a list?
I dont want to specifically hard code sodocumententry because depending on my results it may not be that specific name.
Ideally I want to use the node to enter into a .selectNodes(“node name”) to create a list. I am assuming there is an attribute or element method for that.
> <data>
> <sodocumententry>
> <EMPLOYEEID><![CDATA[001195]]></EMPLOYEEID>
> </sodocumententry>
> <sodocumententry>
> <EMPLOYEEID><![CDATA[001085]]></EMPLOYEEID>
> </sodocumententry>
IF I use this it works but like I said I want the nodename to be dynamic
List<VTDElement> list = doc_first.selectNodes("//sodocumententry"); for (VTDElement el : list) { doc_out.getRootElement().add(el); }