06-14-2016 02:53 AM
Using something like the XML below, I need to create a nicely formatted Word File with repeating sections (1-n), depending on the number of book elements in the XML: The way I would do it is to create a section "bookSection" which includes a H1 formatted title, H2 subtitle, then text (if there is a description), then a table for ISBN, Author(s) etc. After that I should be able to use a single statement to loop through (for-each) all book elements and just insert the section "bookSection" 1-n times. How can I do that with the Template Builder (OB16)? I can enter the XPath to find all book or title elements but then I can't find an option to actually use them all including their children.
<books>
<book read="true" changes="false">
<title>Illuminati</title>
<subtitle></subtitle>
<description></description>
<ISBN>978-3-12-732320-7</ISBN>
<Authors>
<Author>Dan Brown</Author>
<Author>Nobody Else</Author>
</Authors>
</book>
<book read="false" changes="false">
<title>Diabolus</title>
<subtitle>signed edition</subtitle>
<ISBN>478-3-12-732999-7</ISBN>
<Authors>
<Author>Dan Brown</Author>
</Authors>
<SpecialComment>sold out</SpecialComment>
</book>
<book read="false" changes="true">
<title>Firestarter</title>
<subtitle></subtitle>
<ISBN>178-3-12-756720-7</ISBN>
<Authors>
<Author>Stephen King I</Author>
<Author>Stephen King II</Author>
<Author>Stephen King III</Author>
</Authors>
</book>
</books>
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.