Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
How to retrieve all elements between two nodes with a given class name in XPATH

I extracted this code from tradingview, I want to get access to all the div elements using xpath between this two elements namely C1 indicator and C2 indicator: enter image description here

I tried the following but does not seems working. Any thoughts?

*[following-sibling::div[contains(@data-section-name,'C1 Indicator')] and preceding-sibling::div[contains(@data-section-name,'C2 Indicator')]
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I think the point you missed here is that div elements containing the data-section-name attribute are not siblings, they are each inside another parent div elements with titleWrap class name. So, I guess you should search for siblings of those titleWrap divs, while these parent divs should be located by their child divs containing data-section-name attributes. Something like the following:

*[following-sibling::div[contains(@class,'titleWrap') and .//div[contains(@data-section-name,'C1 Indicator')]] and preceding-sibling::div[contains(@class,'titleWrap') and .//div[contains(@data-section-name,'C2 Indicator')]]

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda