XpathonURL getting the first paragraph

Hi everyone,

I'm interested on getting the first paragraph from each page, the Xpath I got is the following:

//*[@id="middlecolumnhome"]/div[2]/p[1]

So if I want to get the content from that first paragraph, how would the formula look like:

=xpathonurl("http://mysite.com","//*[@id="middlecolumnhome"]/div[2]/p[1]",?,?)

I'm interested on what to add on the last sections.

Any help would be much appreciated.

Hi Josha,

Take a look at the documentation page for Xpath:
https://seotoolsforexcel.com/xpathonurl/

The last two parameters of the syntax are HTTP Settings and Mode. Personally, I almost never use these.

The third last parameter is the attribute which is a basic component of the XML structure. Here is a great guide:
https://www.w3schools.com/xml/xpath_syntax.asp

If you have a webpage and a specific part you want to extract, I can give you the correct formula.