How to tag an inDesign document so that tagged content is in between other tags?

Wednesday, November 4, 2015

It is easy to tag a single piece of content and then export it as xml in inDesign.



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Root><content>Simple text block</content></Root>


What I'm struggling to do is to get it to export tags / content within another set of tags.
Example: I want to tag my document so that it exports as so:



<?xml version='1.0' encoding='UTF-8'?>
<article>
<id>123</id>
<content>
<body>Some text</body>
<headline>Some other text</headline>
</content>
</article>


Here is what I tried:
enter image description here



When I exported the xml I got the following:



<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<article>
<content>Simple text block</content>
<id>123</id>
<content></content>
<body>Some text</body>
<headline>Some other text</headline>
</article>


How do I tag the elements so that it export tags / content within another set of tags?

0 comments:

Post a Comment