Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How find the following-sibling::, preceding-sibling:: & parent:: element and attributes using evaluateXPathExpression option in indesign

Explorer ,
Mar 29, 2016 Mar 29, 2016

Dear All,

How find the following-sibling::, preceding-sibling::  & parent:: element and attributes using evaluateXPathExpression option in indesign.

Please suggest me best way to find xml element and attributes.

Regards,

~Jackkisten

TOPICS
Scripting
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 30, 2016 Mar 30, 2016

Hi

Be aware xpath implementation in ExtendScript is all but exhaustive. Most of those axes won't work.

Due to the one-pass nature of this implementation, the following XPath expressions are specifically

excluded:

No ancestor or preceding-sibling axes, including .., ancestor::, preceding-sibling::.

See xpath limitations in Adobe Scripting guide for more details.

Loic

Ozalto | Productivity Oriented - Loïc Aigon

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 30, 2016 Mar 30, 2016

Hi All,

Then how we can use xpath in indesign to find the xml node

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 31, 2016 Mar 31, 2016

Well, you can still use evaluateXPathExpression to retrieve xmlElements and once grabbed look for following/preceeding-siblings by using indeces or collection nextItem(), previousItem() special functions.

For parent, you can use…parent property of any xmlElement…

FWIW,

Loic

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 31, 2016 Mar 31, 2016

Hi Loic,

Could you possible to give some example and sample code for evaluateXPathExpression, collection.

Thanks in advance!!

Regards,

~Jackkisten

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Apr 01, 2016 Apr 01, 2016
LATEST

XPATH : XPath Syntax

evaluateXPathExpression:Adobe InDesign CS6 (8.0) Object Model JS: XMLElement

Sample codes all around…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines