I have been trying since long to extract data using xpath in google sheets but everytime 'am getting message 'imported content is empty'. i need help . The url is http://reports.ieso.ca/public/IntertieScheduleFlow/PUB_IntertieScheduleFlow.xml

Recommended Answers

Hello unprecedented way

Your Probelm is handling namespace

to you shall define a namespace
and then start with XPath


from Google XML file

xmlns = "http://www.theIMO.com/schema"

So give to name as a parameter http://www.theIMO.com/schema

or as a variable

ns1 = "http://www.theIMO.com/schema"

I choose …

Jump to Post

All 4 Replies

To add further to my earlie question ...the page source shows

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://reports.ieso.ca/docrefs/stylesheet/IntertieScheduleFlow_HTML_t1-2.xsl" ?><IMODocument docID="IntertieScheduleFlow" xmlns="http://www.theIMO.com/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.theIMO.com/schema http://reports.ieso.ca/docrefs/schema/IntertieScheduleFlow_r2.xsd">
<DocTitle>Intertie Schedule and Flow Report</DocTitle>

And i tried the following xpath

I would like to extract the value of Import 30 ;
I think i am clear in explaning my problem a bit in detail

yes that's correctly define ns1
and then use
with // ns1: Export
38 entries found

I have the tool stylus used
and an XPath query started
and without namespace gets no result

to test create a local file on the hard disk
and the namespace xmlns = "http://www.theIMO.com/schema" remove
then test without namespace // Export

based on Example

// ns1: IMODocBody / ns1: IntertieZone [2] / ns1: schedules / ns1: Schedule / ns1: Export

0 results

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.