Skip to main content
Inspiring
October 15, 2021
Question

Get the content of Indesign document

  • October 15, 2021
  • 2 replies
  • 334 views

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.

 

 

 

This topic has been closed for replies.

2 replies

Legend
October 15, 2021

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

Nithu_SAuthor
Inspiring
October 15, 2021

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

Nithu
Sunil Yadav
Legend
October 19, 2021

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