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

Scripting import of multiple xml tables

Explorer ,
Nov 09, 2015 Nov 09, 2015

Copy link to clipboard

Copied

I'm creating a report with a large number of tables - one table per page.  I'm importing and XML file for each table.  It seems like this would be an ideal candidate for scripting.  If someone could show me a example in VBScript or JavaScript for importing an xml file, assigning the xml code to a text box, and moving to the next page, I'd be eternally grateful.  Thanks!

TOPICS
Scripting

Views

349

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
People's Champ ,
Nov 09, 2015 Nov 09, 2015

Copy link to clipboard

Copied

The adobe indesign scripting documentation introduces pretty well this.

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
Explorer ,
Nov 14, 2015 Nov 14, 2015

Copy link to clipboard

Copied

The InDesign scripting manuals are helpful.  I wish they'd have a bit more examples illustrating why the code works a certain way, so I know better how to adapt it.  In particular, the XML section (in which is what I'm mostly interested) describes the elements, but doesn't illustrate code with an actual XML file so you can what happens.  Thanks for your help.

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
People's Champ ,
Nov 16, 2015 Nov 16, 2015

Copy link to clipboard

Copied

Understood. Basically you want to import a XML File with

app.activeDocument.importXML ( File ( "/c/dummy.xml" ) );

Once loaded, you get a fullfilled xml structure hosting several xmlElements. That's where you can use the documentation samples.

You can do so many things with xml elements that I guess it would be a challenge to cover them all here or in a exhaustive documentation.

Loic

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
Explorer ,
Nov 16, 2015 Nov 16, 2015

Copy link to clipboard

Copied

LATEST

Thanks again for your assistance.  I've gotten MOST of my questions answered by the manual and lots of trial and error.

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