I think the question makes sense.
I have the following xml:
<?xml version="1.0"?>
<ArrayOfstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<string>domain\coder1</string>
<string>domain\coder2</string>
</ArrayOfstring>
I am trying to read the two elements into a List.
If I use:
NodeList nList = doc.getElementsByTagName("ArrayOfstring");
....
szCoder = eElement.getElementsByTagName("string").item(i).getTextContent();
In only get "domain\coder1", because my list only has a value of one. If I try using a TagName of "string", I throw a nullpointer.
Any help would be greatly appreciated.
Many thanks in advance
You need to run through all the nodes. To get access to them