Printing description of self->data:
{
root = {
participant = (
{
age = {
text = "\n 27";
};
class = {
text = "\n M 25-29";
};
gender = {
text = "\n M";
};
},
{
age = {
text = "\n 27";
};
class = {
text = "\n M 25-29";
};
gender = {
text = "\n M";
};
},
{
age = {
text = "\n 29";
};
class = {
text = "\n M 25-29";
};
gender = {
text = "\n M";
};
},
There’s an example of my data. The real record is 913 items in length consisting of male and female participants. How do I whittle a dict down to just the Males or Females?
I’ve tried valueForKeyPath:@"root.participant.gender.text==M" but that’s not it. I specifically just want to know the class for Males and Females respectively in case there’s a better way.
Nothing was working so I ended up going with this
The
XMLReader cleanStringjust takes out the\n\s*garbage.