Separate XPathOnUrl data values

#1

Hi,

Im trying to grab all of the text from a description box on a website using the XPathOnUrl function.

I am using "attribute::*" at the end of my XPath, which grabs all of the child text.

A snippet of the code:

        <h4>LP</h4>
     
		<ol>


        <li> Norman fucking Rockwell </li> 
	
		<li> Mariners Apartment Complex </li> 
	
		<li> Venice Bitch </li> 
	
		<li> Fuck it I love you </li> 
                    
        </ol>

I am currently getting the text as one long sentence. I would like it in a format, that keeps each line... on a new line within a single cell

My current sentence...
"LP Norman fucking Rockwell Venice Bitch Fuck it I love you"

My goal...
"LP
Norman fucking Rockwell
Venice Bitch
Fuck it I love you"

I have looked into both "StringJoin" and "Dump", and I cant get them to work in my favour. I think its because the data is coming from XPath as a single sort of sentence.

Any help is much appreciated.

#2

How about this? You were on the right track with StringJoin :slight_smile:

Also using Wrap Text to make the line breaks visible.

#3

I appreciate your help, but that doesn't seem to work for me.

If I were to email you my spreadsheet, would you be able to take a look for me?

Much appreciated
Jackson

#4

Sure, victor@seotoolsforexcel.com

#5

Thank you for your help. This has solved my problem.

The key to my solution has been to use the XPath attribute "//*"