Skip to main content
Known Participant
September 15, 2011
Question

unable to define the XML tags with colon in XPath using gluecode

  • September 15, 2011
  • 2 replies
  • 2109 views

Hi Everyone,

I am working on XML with InDesign CS4. I need to do some automation stuffs for those. In my InDesign document, the XML tags (Eg. <ab:para>, <ab:figure> & etc…) name contains colon characters. If i try to loop these tags through gluecode using XPath expression, the script throws me a error like 'Adobe InDesign cannot processXPath expression'.

Can anyone look into this and suggest me a right solution.

Thanks in advance.

Thiyagu

This topic has been closed for replies.

2 replies

September 15, 2011

No need to give namespace [ab:] in xpath expression, you can give element name without namespace it will work.

கற_பன___Imagine_
Inspiring
September 15, 2011

Hi thiyagu,

    this.xpath = "//para";

    this.xpath = "//figure";

Try this without the XML namespace in XPath Expression.  it's not tested code,  but it may works.

Regards,

Nagaraj

dhishokAuthor
Known Participant
September 16, 2011

Thank you Nagaraj and Dev. It is working fine now.