What XPATH syntax works with Google Sheet's IMPORTXML
function that will retrieve multiple siblings and place them in separate cells?
In this XML sample code, I'm trying to retrieve all elements after <principal>
.
<Comps>
<response>
<properties>
<principal>
<title>Test data</title>
<misc>Test data 2</misc>
<links>
<homedetails>details</homedetails>
<graphsanddata>graphs</graphsanddata>
<mapthishome>maps</mapthishome>
<comparables>comparables</comparables>
</links>
</principal>
</properties>
</response>
</Comps>
I use the following formula:
=IMPORTXML(url, "//principal/*")
The result appears on separate rows as:
Test data
Test data 2
detailsgraphsmapscomparables
The four siblings under <links>
are placed in one cell.
How can I disaggregate those siblings into separate cells like the following:
Test data
Test data 2
details
graphs
maps
comparables