Include carriage returns in XML export
I'm a software developer working on an InDesign-to-web integration for a publishing company.
The first step of the integration is to tag the contents of an .indd file, then export the tagged structure as XML. Each column (or flowing columns) of text is tagged as a paragraph. For example, an article with 3 columns of flowing text is tagged as a "paragraph". Inside of a column tagged as "paragraph", there are multiple groupings of text.
In the screenshot below, the blue outline represents the element tagged as "paragraph". The yellow highlights represent where one group of text ends and the next begins.
When I export the tagged content, I need to include line breaks (denoted by the yellow highlight) so I can properly distinguish one group of text from another as I translate it into HTML code. Currently, the export doesn't include line breaks, so the text is converted to the web as a single blob of text.
In the screenshot below, the red lines represent where one group of text ends and the next begins. Ideally, the export would include a new line character in that position.
Is it possible to add a carriage return/line break character between each block of text?
Notes
I understand a HTML export exists, but we chose to go with the XML export instead for many reasons:
Control over the order of placement of text & image content.
- Ability to add meta data about the article content (categories, tags, author/editor, etc.)
- Absolute control over the HTML structure created as the content is migrated to the web.
- Easier to store or migrate to other data sources
