1. By Using evaluate xpath expression, you can get the //a[@href] elements.
2. Iterate those elements.
3. Set hyperlink text source then add hyperlink to the source text using the attribute value.
Thanks for that. This will take me a while (inexperienced scripter...)
3. Setting the hyperlink as an attribute. Below is how I imagined the XML should be structured:
<ArticleTitle href="http://www.link.com">Text to be hyperlinked</ArticleTitle>
The above doesn't create a hyperlink, which I sort of expected it to.
I tried adding the hyperlink within InDesign and exporting the XML to see how it should be formatted but the hyperlink created in InDesign doesn't appear.
In the meantime, I'll continue to learn about xpath expressions...
Okay, still stuck here. I cannot find any reference for how to include the URL in an XML tag that carries through into InDesign. Do I need to script that so it grabs the attribue for an XML element and adds the URL to a hyperlink within InDesign?
I believe I can get the XML structured so the URL is an attribute rather than a seperate XML element. Otherwise I'll cross that bridge once I crack getting the hyperlink into InDesign.
Can anyone help or point me in the right direction?