XPathOnURL only get inner html

Hi Community,

if i use the XPathOnURL with the following tag:

=XPathOnUrl(A2;"//div[@id='category']";;;"html")

i will get the code like:

<div id="category"><h2>Werbemittel</h2><p>Sie suchen nach einer Lösung, um gedruckte Werbemittel ansprechend zu präsentieren? Dann sind unsere Prospektständer ideal für Sie.</p><p>Dann sind unsere Prospektständer ideal für Sie.</p></div>

But is there a way to get only the inner HTML, like this:

<h2>Werbemittel</h2><p>Sie suchen nach einer Lösung, um gedruckte Werbemittel ansprechend zu präsentieren? Dann sind unsere Prospektständer ideal für Sie.</p><p>Dann sind unsere Prospektständer ideal für Sie.</p>

Thanks in advance for Tipps!

Good question, do you have an example URL to test with?

Works with every div.

But here is an example:

=XPathOnUrl(A1;"//div[@id='bsf_rt_marker']";;;"html")

with the URL https://www.gernot-gawlik.de

The result ist like

<div id=""bsf_rt_marker""><p>Bääähm! Es ist soweit der SEO Contest 2023...

instead of

<p>Bääähm! Es ist soweit der SEO Contest 2023...

But with a few String Operations (Replace or LEFT) i've solved this. But i thouhgt maybe there is a Parameter for that, which i don't know.

Thanks, I've updated the code so it takes the inner html instead. Requires an update of SeoTools itself:
https://releases.seotoolsforexcel.com/SeoTools_v10.0.1.0_20230717.zip

Thank you. But i don't know how the others work with this formula. Maybe it would be better to solve this with an optional parameter.

I don't want to be responsible for, if the Excel Sheets from the other users are don't work anymore :wink:

Greets
Gernot

There is also some value in getting the same html tag as you request because it may contain properties and other stuff.

I've updated with a new release with these options:
"html" - same as before
"innerhtml"

https://releases.seotoolsforexcel.com/SeoTools_v10.0.1.0_20230718.zip

Perfect!

Thank you very much!