Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


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

73

Likes

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

Likes

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
Adobe Community Professional ,
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

Likes

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.

Likes

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