🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
1 messages
1 total messages Started by Peter Davis Fri, 20 Mar 2009 14:30
[JS] using evaluateXPathExpression with namespaces?
#294
Author: Peter Davis
Date: Fri, 20 Mar 2009 14:30
20 lines
1880 bytes
I'm trying to find all the XML elements that match abc:xyz, using the
evaluateXPathExpression function.

This works beautifully if I just have local tag names, <abc ...>.
However, I can't find any way to get the namespace matching to work.
I've tried

var xpath = "//xyz"'
var prefixMatchingTable = [["abc", "http://www.abc.com"]];
var elems = root.evaluateXPathExpression(xpath, prefixMatchingTable);

but this returns nothing.  I've tried with and without the
prefixMatchingTable argument, and with and without including the
actual prefix, "abc:" in the xpath.  None of these permutations seems
to work.

Any examples or info on this?

Thanks!
-pd
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads