Answer the question
In order to leave comments, you need to log in
How to formulate the Xpath expression correctly please?
There is approximately the following html (I removed the extra):
<div class="characteristic">Серия </div>
<div class="value" >ProLiant </div>
<div class="clear"></div>
<div class="characteristic">Тип корпуса </div>
<div class="value" >Rack </div>
<div class="clear"></div>
Answer the question
In order to leave comments, you need to log in
Here is quite a working xpath
The main thing with the encoding is that there are no problems. For example, in the case of php, I had to force the text to be converted to UTF-8 before feeding it into the loadHTML () method;
$html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");
I entered the html incorrectly
<div class="char c1 ">
<div class="characteristic">Для процессоров </div>
<div class="value"> Intel </div>
<div class="clear"/>
</div>
<div class="char c0 ">
<div class="characteristic">Серия процессора </div>
<div class="value"> Xeon </div>
<div class="clear"/>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question