• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

FrameMaker > XML

Explorer ,
Feb 13, 2018 Feb 13, 2018

Copy link to clipboard

Copied

Hi,

I am exporting fm document to xml using following code

    IntT index;

    F_PropValsT params, *returnParamsp = NULL;

    F_ObjHandleT activeDocId = F_ApiGetId(0, FV_SessionId, FP_ActiveDoc);

    params = F_ApiGetSaveDefaultParams();

    index = F_ApiGetPropIndex(&params, FS_FileType);

    params.val[index].propVal.u.ival = FV_SaveFmtXml;

    StringT fmFilePath = "C:\\store\\newFM.xml"

    F_ApiSave(activeDocId, fmFilePath, &params, &returnParamsp);

    F_ApiDeallocatePropVals(&params);

    F_ApiDeallocatePropVals(returnParamsp);

Able to get xml file successfully but it ignores text frame and convert anchor frame to an image.

Is there any ways to get these too as part of xml text?

Thanks in advance.

Best Regards,

Paresh

TOPICS
Structured

Views

713

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Feb 13, 2018 Feb 13, 2018

Paresh,

Do you have a structure application defined for the file? That is, the ruleset for conversion to XML? Your code does not reference one (that is, you did not set FS_StructuredSaveApplication). It would be the structure application that handles these details, not the FDK F_ApiSave() code.

Russ

Votes

Translate

Translate
Mentor ,
Feb 13, 2018 Feb 13, 2018

Copy link to clipboard

Copied

Paresh,

Do you have a structure application defined for the file? That is, the ruleset for conversion to XML? Your code does not reference one (that is, you did not set FS_StructuredSaveApplication). It would be the structure application that handles these details, not the FDK F_ApiSave() code.

Russ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 13, 2018 Feb 13, 2018

Copy link to clipboard

Copied

Hi Russ,

Thanks for the pointers. No I don't have structure defined for the file. I am trying with std fm file created using templates.

I tried using XDocBook for FS_StructuredSaveApplication but got no difference in output.

I am referring your suggestion Re: Breaking change in F_ApiSimpleSave saving documents in FrameMaker12 ​

I presume I am messing up the ruleset value. Could you please tell me what all are valid values for structApp.

Paresh

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 14, 2018 Feb 14, 2018

Copy link to clipboard

Copied

Paresh, this is a very complicated topic, perhaps as complicated as any related to FrameMaker. To import or export XML from FrameMaker, you need a structure "application," which has many components that define rules for the translation. If you are using a standard structure definition like DocBook or DITA, you can use the structure apps that come with FrameMaker. Otherwise, you have to build your own. This is no trivial matter. If you are committed to this effort, I would suggest that you get a copy of the FrameMaker Structure Developer's Guide and reserve lots of time to get it figured out. There is not much more I can do for you in this forum, other than to answer very specific questions if you have them along the way.

Russ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

Thanks Russ. You pointers helped me. I decided to create my own custom xml (by traversing flow/frames/pgs/textitems) instead of getting into complexity of structure application and rule translation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 15, 2018 Feb 15, 2018

Copy link to clipboard

Copied

LATEST

Paresh, that is definitely one way to do it. And, I can where it might be best option in some situations. I'm glad I could help you some. I was afraid that I wasn't very helpful at all, because your question was so big

Russ

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines