Highlighted

XML export/import

New Here ,
Oct 01, 2020

Copy link to clipboard

Copied

Good afternoon.
I recently got acquainted with the InDesign 2020 product, but I am faced with the task of changing the text of the document with a third party program. I started looking at export and import from xml, but it turned out that the finished document is exported as <root> </root> and what kind of data. Can anyone tell me if it is possible to upload a document as xml, without making changes to its structure? or just immediately create a document in the form of xml and only in this case will it be possible to export and import? I am also concerned about the question if the structure of the document changes, i.e. will need to add a new block, is it possible to do this from xml?

TOPICS
How to, Import and export

Views

56

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

XML export/import

New Here ,
Oct 01, 2020

Copy link to clipboard

Copied

Good afternoon.
I recently got acquainted with the InDesign 2020 product, but I am faced with the task of changing the text of the document with a third party program. I started looking at export and import from xml, but it turned out that the finished document is exported as <root> </root> and what kind of data. Can anyone tell me if it is possible to upload a document as xml, without making changes to its structure? or just immediately create a document in the form of xml and only in this case will it be possible to export and import? I am also concerned about the question if the structure of the document changes, i.e. will need to add a new block, is it possible to do this from xml?

TOPICS
How to, Import and export

Views

57

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
Oct 01, 2020 0
Adobe Community Professional ,
Oct 01, 2020

Copy link to clipboard

Copied

When using XML in InDesign, by default the root element is called <root> as you've discovered. Although you always need a root element in InDesign (as you do in XML), that root element doesn't have to be called <root>. You can name it anything that you wish. You can do this by opening the Tags pane which is found by choosing Window > Utilities > Tags. Create a tag of your choosing and make it the root element. I hope that helps!

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
Reply
Loading...
Oct 01, 2020 0
Advisor ,
Oct 01, 2020

Copy link to clipboard

Copied

If your project is about more than just filling in some XML tagged templates, you may also consider IDML and its siblings ICML and Snippets. IDML is basically a ZIP file containing multiple XML files, and those provide access to almost everything in the document, very similar to scripting. ICML is a subset for only text and related formatting.

You can add "blocks" - here called paragraphs - with any format. Actually InDesign does not produce blocks from Tags (as specified by CSS in other environments), instead it will do that for any CR/LF character - along with some other unconventional ideas about white space.

The "smart text reflow" feature can be used to adjust the number of pages https://helpx.adobe.com/indesign/user-guide.html/indesign/using/threading-text.ug.html#use_smart_tex...

If that is not sufficient (choice of master page controlled by some criteria), you may consider a postprocessing script.

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
Reply
Loading...
Oct 01, 2020 0
Advisor ,
Oct 01, 2020

Copy link to clipboard

Copied

For completeness sake, if you know JavaScript you can also use InDesign ExtendScript (an ancient JavaScript dialect) to parse an arbitrary XML and perform any changes in the document from that script.

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
Reply
Loading...
Oct 01, 2020 0