XML Node.getNodeValue Problem
I am new to the community but I figured if there is anywhere I can get a reasonable explanation for my problem it would likely be here.
I have the following class that I created to identify certain countries that are found in an XML node as a value:
public static int isCountry(String countryName)
int countryInstance = 0;
String country ="";
String countryFilters = new String;
country = countryFilters[countryCtr].toString();
if(country == countryName)
if(countryInstance > 0)
The problem I am encountering is that if I test this class from main() and pass a string value that is in the array it works just as intended. :)
But if I implement this class in my XML parsing code and dynamically pass in the value using the Node.getNodeValue() method it doesn't work.
I have even added the toString() method and explicitly assigned the value to a string and it doesn't work. :confused:
Anyone having a possible clue as to why this isn't working that could provide some insight on the issue, I would greatly appreciate the help.