I have an xml I am using TouchXML to parse it. Basically, a Lookup looks like this:
<Lookup>
<LookupID>201150103538705</LookupID>
<LookupName />
<LookupType>Category</LookupType>
<VendorID>10</VendorID>
</Lookup>
When I do this, it returns all Lookup in the document:
NSArray *lookups = [[xmlDoc rootElement] nodesForXPath:@"//TestA:Lookup"
namespaceMappings:mappings
error:nil];
What I want to do is get all lookups whos LookupType is equal to Composition (string compare). So this is what's I have tried and it returns null:
NSArray *lookups = [[xmlDoc rootElement] nodesForXPath:@"//TestA:Lookup[LookupType=\"Composition\"]"
namespaceMappings:mappings
error:nil];
Thanks