I am trying to parse an XML to extract values of certain variables. Here's an example:
<?xml version='1.0'?>
<Main xmlns='http://www.abc.uk' version='1.0' name='full'>
<child1 version='2.0'>
<value1> xyz </value1>
<userinfo>
<name> joe </name>
<pass> joepass </pass>
</userinfo>
</child1>
</Root>
Question: How do I extract the 'xyz' value to display ? How do I extract 'joe' and 'joepass' to display ?
From my understanding, child1 is the root with attribute 'version'. 'value1' and 'userinfo' are both elements. In Cocoa, how would I display these values ? I can do a [child elementsForName:@"userinfo" and it displays all the values. I need to specifically extract 'joe' and 'joepass'. Thanks.