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

Get the content of Indesign document

Explorer ,
Oct 15, 2021 Oct 15, 2021

Copy link to clipboard

Copied

Hi all,

I need to fetch the InDesign Document content from the XML file which is based on the Structure in Indesign application. I have attached the sample Structure for the reference. Kindly guide me.

 

 

 

Nithu
TOPICS
How to , Scripting

Views

143

Translate

Translate

Report

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 ,
Oct 15, 2021 Oct 15, 2021

Copy link to clipboard

Copied

I have updated the sample image by which I need to fetch the values from the structure 

Nithu

Votes

Translate

Translate

Report

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
Advocate ,
Oct 19, 2021 Oct 19, 2021

Copy link to clipboard

Copied

LATEST

Try this code: 

var allNodes = app.documents[0].xmlElements[0].evaluateXPathExpression("//category/category_section_id");
for(var i = 0; i < allNodes.length; i++){
    alert (allNodes[i].contents.toString());
    }

Best

Sunil

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 15, 2021 Oct 15, 2021

Copy link to clipboard

Copied

What obstacle to you face in parsing and interpreting the XML, which I see you already have? What platform/API/Devtools? Please be specific.

Votes

Translate

Translate

Report

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