SeoToolsGetConfig() Question

I have these two <Header...> tags in my config's section:

<Header Name="User-Agent">
<Header Name="Accept">

When I insert the following formula, it only returns the first instance for User-Agent:

=SeoToolsGetConfig("HttpDownloader/GlobalSettings/RequestHeaders/Header")

Is it possible to identify a specific instance of such tags?

I tried changing the path to .../Header[@name='Accept'] or .../Header[@name], and even specifying "name" as a second parameter, but none of these worked. I did discover, however, that enumerating the path such as .../Header[2] does work. :grinning:

If specifying properties (similar to Xpath) is not currently possible, I'd like to request this feature. Even better, maybe return multiple values as an array, just as with XPathOnUrl()?

Hi,

Can you try to use the Dump() formula? Should return an array of both Headers.

Nope. It doesn't return an array, so Dump() simply shows the same result. Here are the full tags for both Headers in my config if you'd like to try it:

<Header Name="User-Agent">Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36</Header>
<Header Name="Accept">text/html</Header>

You are correct, will add this to the todo-list. Thanks for being observant :slight_smile:

An overdue update. I've changed so the function returns an array which is compatible with Dump(). Will be available in the next release of Seotools.