D
diffused
Is it possible to search using each element in a array, to see if it
exists in another array?
I have two string arrays, one is hardcoded, the other one is parsed
from a XML file.
String[] arrayStrField = {"ClinicId","ClinicName",
"KmRangePostcode","Suburb","State","ClinicPostcode", "Doc",
"DateLastChanged", "AdditionalPostcodes", "ClinicStatus",
"ClinicURL"};
pXmlMsg.mArrField = pXmlField.getElement(i).asString();
How would i search element by element in the mArrField to see if each
element exists as one of the elements in the arrayStrField?
ie ..
boolean activeField = checkFieldArray(arrayStrField,
xmlMess.mArrField);
private boolean checkFieldArray(String[] arrayStrCheck, String[]
arrayStrVar)
{
boolean b = false;
// if (all arrStrVar do exist in arrayStrCheck[]
{
b = true;
}
return b;
}
how would i go about doing this?
exists in another array?
I have two string arrays, one is hardcoded, the other one is parsed
from a XML file.
String[] arrayStrField = {"ClinicId","ClinicName",
"KmRangePostcode","Suburb","State","ClinicPostcode", "Doc",
"DateLastChanged", "AdditionalPostcodes", "ClinicStatus",
"ClinicURL"};
pXmlMsg.mArrField = pXmlField.getElement(i).asString();
How would i search element by element in the mArrField to see if each
element exists as one of the elements in the arrayStrField?
ie ..
boolean activeField = checkFieldArray(arrayStrField,
xmlMess.mArrField);
private boolean checkFieldArray(String[] arrayStrCheck, String[]
arrayStrVar)
{
boolean b = false;
// if (all arrStrVar do exist in arrayStrCheck[]
{
b = true;
}
return b;
}
how would i go about doing this?