I'm trying to parse through an XML file, using importXML, on a Google apps spreadsheet.
My problem is that I have my XML document set up like this:
staffList
staff
name
email
staff
name
staff
name
email
and I'm trying to select all of the email elements (I tried //staff/email, but it doesn't insert null if the node does not exist), and write NULL if the node for email does not exist (like in the above example).
I tried the XPath query below, but it only is selecting the first email element, and writing into 1 row, rather than writing into n rows, where n is the number of 'staff' nodes.
=ImportXML("http://www.engr.udel.edu/mf/test_staff.xml";"concat(/staffList/staff/email, substring('not-found', 1 div not(/staffList/staff/email[node()])))")
Does anybody have any ideas? Thanks in advance!