Skip to main content
Participant
June 18, 2019
Answered

How do I populate data from xml file to create MIF Event tables ?

  • June 18, 2019
  • 1 reply
  • 513 views

I have some data in xml format and I need to create tables by importing data from the xml file using MIF libraries .How do I do this ?

This topic has been closed for replies.
Correct answer Stefan Gentz

If the source data is in XML, it's probably better to create a structured application that understands this XML and maps it into FrameMaker table elements. Depending on the complexity of your source XML, read/write rules (rwrule) might be enough for this. Otherwise a structured application that does XSLT Preprocessing when opening your XML might be the better option. Once you have the XML open in FrameMaker and rendered as a table, you can continue to work in Structured FrameMaker or copy & paste a table from this structured document into an unstructured document and remove the structure. Depends on if your final FrameMaker document is xml-based (e.g. DITA) or a classic "unstructured" document.

Maybe you can post some sample xml code here?

1 reply

Stefan GentzCorrect answer
Legend
June 19, 2019

If the source data is in XML, it's probably better to create a structured application that understands this XML and maps it into FrameMaker table elements. Depending on the complexity of your source XML, read/write rules (rwrule) might be enough for this. Otherwise a structured application that does XSLT Preprocessing when opening your XML might be the better option. Once you have the XML open in FrameMaker and rendered as a table, you can continue to work in Structured FrameMaker or copy & paste a table from this structured document into an unstructured document and remove the structure. Depends on if your final FrameMaker document is xml-based (e.g. DITA) or a classic "unstructured" document.

Maybe you can post some sample xml code here?

Participant
June 19, 2019

Hello Stefan

Thank you for your reply .

This is how I have the content in my XML source data

<EVENT>

         <Event Name>Employee1</Event Name>

         <Category>Regular</Category>

         <Event ID >480</Event ID>

</EVENT>

<EVENT>

         <Event Name>Employee2</Event Name>

         <Category>Part-time</Category>

         <Event ID >482</Event ID>

</EVENT>

And I need the table as below ,

Event Name

Category

Event ID

Employee1

Regular

480

Employee2

Part-time

482

Could you please give me few example scripts that maps the data from the xml file to the framemaker table elements ?