title: getting zero objects from the xml file in the array in iphone
body: <p>Hi all i am trying to use xpathQuery for the below xml data.</p>
  
  <p>My xml file starts with assessmentItem. There is not even single character before assessmentItem          </p>
  
  <pre><code>&lt;assessmentItem adaptive="false" identifier="wordsearch" timeDependent="false" title="Word Search" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1 
  http://www.imsglobal.org/xsd/imsqti_v2p1.xsd" 
  xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"   
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  
  
  
  &lt;itemBody&gt;
  
  
  &lt;div id="heading"&gt;
    &lt;p&gt;&lt;![CDATA[&lt;TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" fontFamily="Verdana" fontSize="9" lineBreak="inherit" paddingBottom="inherit" paddingLeft="2" paddingRight="2" paddingTop="6" verticalAlign="inherit" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"&gt;&lt;p&gt;&lt;span&gt;Word search&lt;/span&gt;&lt;/p&gt;&lt;/TextFlow&gt;]]&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="direction"&gt;
    &lt;p&gt;&lt;![CDATA[&lt;TextFlow columnCount="inherit" columnGap="inherit" columnWidth="inherit" fontFamily="Verdana" fontSize="9" lineBreak="inherit" paddingBottom="inherit" paddingLeft="2" paddingRight="2" paddingTop="6" verticalAlign="inherit" whiteSpaceCollapse="preserve" xmlns="http://ns.adobe.com/textLayout/2008"&gt;&lt;p&gt;&lt;span&gt;Find the words in the grid&lt;/span&gt;&lt;/p&gt;&lt;/TextFlow&gt;]]&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="mask"&gt;
    &lt;p&gt;&lt;![CDATA[Yes]]&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="layout"&gt;
    &lt;p&gt;&lt;![CDATA[13*13]]&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;div id="numOfGuesses"&gt;
    &lt;p&gt;&lt;![CDATA[10]]&gt;&lt;/p&gt;
  &lt;/div&gt;
  &lt;matchInteraction maxAssociations="2" responseIdentifier="RESPONSE" shuffle="true"&gt;
    &lt;simpleMatchSet&gt;
      &lt;simpleAssociableChoice identifier="W_1" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[harsha]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_2" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[dinakar]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_3" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[hurixsystems]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_4" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[aspire]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_5" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[india]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_6" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[kitab]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_7" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[google]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_8" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[australia]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_9" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[elephant]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_10" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[mumbai]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_11" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[hyderabad]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_12" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[chennai]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
      &lt;simpleAssociableChoice identifier="W_13" matchMax="1"&gt;
        &lt;p&gt;&lt;![CDATA[dictera]]&gt;&lt;/p&gt;
      &lt;/simpleAssociableChoice&gt;
    &lt;/simpleMatchSet&gt;
  &lt;/matchInteraction&gt;
  //bla bla..
  </code></pre>
  
  <p>form the above xml i am trying to get array which contains "p-tag"values as a child of simpleMatchSet.
  my xpath query is like this </p>
  
  <pre><code>  NSString *xmlFilePath=[[NSBundle mainBundle]pathForResource:@"wordsearchmain" ofType:@"xml"];
  NSData *data=[[NSData alloc]initWithContentsOfFile:xmlFilePath];
  
  NSString *xpathQuery = [[NSString alloc] initWithFormat:@"assessmentItem/itemBody/matchInteraction/simpleMatchSet/../simpleAssociableChoice/p/text()"];
  NSDictionary *results = PerformXMLXPathQuery(data, xpathQuery);
  [xpathQuery release];
  </code></pre>
  
  <p>i dont know where i did mistake to get data from the xml.can any one suggest me to correct my xpathQuery.Thanks all.All suggestions acceptable.</p>