Answer the question
In order to leave comments, you need to log in
Is it possible to get such output using xpath?
Hello! It is necessary to obtain from information of this type:
<div>
%p lorem
%p lorem
%pre
<span>нужная</span> информация с
отступами и тегами span <span>и </span>
прочими, чуть ли не на каждом символе.
%div.someclass НЕНУЖНАЯ ИНФОРМАЦИЯ
</div>
%p lorem
%p lorem
%pre
информация
с сохраненными отступами
но без ненужных тегов
Answer the question
In order to leave comments, you need to log in
The main catch is that I don't understand how to require all the elements inside the parent div with html tags, but the elements inside the pre without html tags.
<div>
<p>lorem<span>1</span></p>
<p>lorem<span>2</span></p>
<pre>
test <span>t</span><span>e</span><span>x</span><span>t</span>
</pre>
</div>
'<p>lorem<span>1</span></p>'
'<p>lorem<span>2</span></p>'
'test '
't'
'e'
'x'
't'
''
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question