I'm going to get the updated GDP info by using importXML from IMF webpage. I type in the following in the spreadsheet, but it return "N/A" Is there anything wrong with my input?


1 Answer 1


The bot that fetches content for importxml only gets the HTML source of the page, not any dynamic elements inserted in it with JavaScript. You can see what it sees by opening the page and choosing view-source (typically available with right-click). This is the relevant HTML element:

<imf-ranking dataset={parent.state.dataset} indicators={parent.state.indicators} year={parent.year}></imf-ranking>

There is no data here. The attributes like dataset={parent.state.dataset} indicate that the data will be inserted in this element with a script. importxml cannot access it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.