Generate XML from FrameMaker Document

Q

How to generate an XML file from a FrameMaker document? I want to transform the document to other formats.

✍: FYIcenter.com

A

You can follow this tutorial to generate an XML file from a FrameMaker book.

1. Open the FrameMaker document like FM-Document-Example.fm.

2. Select the FrameMaker document in the document panel, if you have multiple documents open. Then click "File > Save As" menu You see the "Save Document" screen.

3. Enter the text file name like "FM-Document-Example". And make sure that "Save as type" is set to "XML (*.xml)".

4. Click "Save".

5. Wait for FrameMaker to finish generating the XML file.

6. Go to the folder where the XML file was saved. You actually see two files generated:

FM-Document-Example.xml - Contains XML code for the document
FM-Document-Example.css - Contains display CSS styles 

7. Open FM-Document-Example.xml in an XML editor. You see how the document content is organized.

<?xml-stylesheet href="FM-Document-Example.css" type="text/css" 
   charset="UTF-8"?>
<ROOT>
    <TITLE> </TITLE>
    <Body>
        <A ID="pgfId-998390"/>
First FrameMaker Document</Body>
    <Body>
        <A ID="pgfId-998556"/>
By FYIcenter.com</Body>
    <Body>
        <A ID="pgfId-998553"/>
    </Body>
    <Body>
        <A ID="pgfId-998496"/>
This is our first FrameMaker document. A FrameMaker document a 
single-file document created in FrameMaker and saved in FrameMaker 
file format (.fm). </Body>
    <Body>
        <A ID="pgfId-998516"/>
    </Body>
...

The picture below shows you how to generate XML from a FrameMaker document:
Generate XML from FrameMaker Document

 

Create and Update FrameMaker Documents

⇒⇒FrameMaker Tutorials

2018-01-16, 351👍, 0💬