Filemaker:导出PLIST(适用于iOS) [英] Filemaker: exporting a PLIST (for iOS)

查看:91
本文介绍了Filemaker:导出PLIST(适用于iOS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要导出为iOS兼容的PLIST的数据库.

I have a database which I want to export as an iOS compatible PLIST.

我想出的解决方法是创建一个计算字段,该字段添加标记的填充和标题,并使用这些字段创建报告.然后,我将报告的预览导出为PDF,在Acrobat Reader中打开PDF,选择所有文本,复制并粘贴到XCode中,该XCode可以识别PLIST格式,并且可以正常工作.

The work around I have come up with is to create a calculated field which adds the tagged padding and header and creates a report using these fields. I then export the preview of the report as a PDF, open the PDF in Acrobat Reader, select all text, copy and paste into XCode which recognises the PLIST format and all works as expected.

是否有更好的方法? (这似乎是一种令人费解的处理方式,出错的几率很高,等等.)导出为XML"选项看起来很有希望,但我似乎没办法.

Is there a better way of doing this? (This seems a really convoluted way of doing things, high chance of error, etc.) The Export as XML option looks promising but I can't seem to join the dots.

推荐答案

我可以想到两种方法来做您想做的事情.您建议的最优雅的方法可能是带有XSLT导出的XML.但是,如果您还不了解XSLT,则可以尝试以下操作-听起来就像已经创建了计算所得的XML行,就像对数据库进行的简单更改一样:

Two ways that I can think of to do what you're trying to do. The most elegant way is probably the XML with XSLT export which you suggest. If you don't already know XSLT, though, you might try the following -- it sounds like with the calculated XML line you've already created, like this would be a simple change to your database:

  1. 创建一个新的全局字段,例如 outputXML
  2. 创建一个脚本,例如说 plistCreator
  1. Create a single new global field, say outputXML
  2. Create a script, say plistCreator

plistCreator 脚本中:

  1. outputXML 设置为"
  2. 转到要导出的第一条记录
  3. 遍历每条记录,将您计算的XML行放入 outputXML (将字段 outputXML 设置为 outputXML &¶& calculatedXMLLine)
  4. 转到下一条记录,在上一条之后退出
  5. outputXML
  6. 导出字段内容(请注意,这与导出"不同).
  1. Set outputXML to ""
  2. Go to the first record you want to export
  3. Loop through every record putting your calculated XML line into outputXML (set field outputXML to outputXML & ¶ & calculatedXMLLine)
  4. Go to next record, exit after last
  5. Export Field Contents (note that this is a different command than Export) for outputXML

这篇关于Filemaker:导出PLIST(适用于iOS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆