title: get all images with xpath
body: <p>I'm trying to get all image from u list in HTML with Hpple and xpath but no benefit</p>
  
  <p>my HTML node like these</p>
  
  <pre><code>&lt;ul id="week_slider"&gt;
        &lt;div id="week_program_img"&gt;
              &lt;img id="Img1" src="imageurl"&gt;    
        &lt;/div&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>but some times (img) tags be inside (a) tags like this</p>
  
  <pre><code>&lt;a href="url"&gt;
         &lt;img id="Img1" src="imageurl"&gt; 
  &lt;/a&gt;
  </code></pre>
  
  <p>and I can get only the images (which not in 'a' tags) when put this path in xpath </p>
  
  <pre><code>//ul[@id='week_slider']//div[@id='week_program_img']
  </code></pre>
  
  <p>also I can get images (which in 'a' tags) when put this path in xpath</p>
  
  <pre><code>//ul[@id='week_slider']//div[@id='week_program_img']/a
  </code></pre>
  
  <p>but I want to get all of images in same time both of in or without  tags 
  how can i do this in same xpath ?
  i try use (or)  , (|) , (and) operators like this</p>
  
  <pre><code>//ul[@id='week_slider']//div[@id='week_program_img'] | //ul[@id='week_slider']//div[@id='week_program_img']/a 
  </code></pre>
  
  <p>but it's not working fine</p>
  
  <p>my full code :</p>
  
  <blockquote>
    <p>NSString *tutorialsXpathQueryStringimage1 =
    @"//ul[@id='week_slider']//div[@id='week_program_img']";</p>
  
  <pre><code>NSArray *newsNodesimage1 = [newsParser searchWithXPathQuery:tutorialsXpathQueryStringimage1];
  
  
  
  
  NSMutableArray *image1 = [[NSMutableArray alloc] initWithCapacity:0];
  for (TFHppleElement *element in newsNodesimage1) {
  
  
  
      Tutorial *tutorial = [[Tutorial alloc] init];
      [image1 addObject:tutorial];
  
      for (TFHppleElement *child in element.children) {
          if ([child.tagName isEqualToString:@"img"]) {
  
              tutorial.imageUrl = [child objectForKey:@"src"];
          }
      }
  
  
  }
  </code></pre>
  </blockquote>