用于创建 XML 文档并通过电子邮件发送的 iPhone 应用程序

发布于 2024-10-12 04:42:02 字数 196 浏览 4 评论 0原文

我正在为我们工作中的内部流程创建一个 iPad 应用程序。

我需要能够创建一个 xml 文件,该文件将包含用户在表单上的某些字段中输入的一些值。然后他们单击“提交”,这将弹出电子邮件表单(来自 MailComposeViewController),我想将创建的 xml 文件附加到他们将发送的这封电子邮件中。这可能吗?如果可以,怎么做?

提前致谢

Im creating an IPad app for an internal process we have in at work.

I need to be able to create an xml file which will be comprised of some values that the user enters into a some fields on a form. Than they click submit and this will than throw up the email form (from the MailComposeViewController) and i want to attach the xml file created to this email that they will send. Is this possible, if so, how?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘿看小鸭子会跑 2024-10-19 04:42:02

这是我通过电子邮件发送 xml 地图数据的片段 --

MFMailComposeViewController *k = [MFMailComposeViewController alloc];
[k init];
[k setSubject:@"Map Data from iPhone"];
[k setMailComposeDelegate:self];
[k addAttachmentData:attachmentData mimeType:@"text/xml" fileName:@"map.xml"];

[k setMessageBody:body isHTML:NO];

[self->controller presentModalViewController:k animated:YES];

用于构建 XML...我呃,我自己做的。这是我的一些方法

-(void)beginElement:(char *)element;
-(void)addAttribute:(char *)attribute value:(char *)attributeValue;
-(void)addText:(char *)text;
-(void)endElement;

(如果您愿意,我很乐意向您发送整个课程,尽管可能有更推荐的构建 xml 的方法:))

希望这有助于为您指明正确的方向!

Here's a fragment where I send xml map data by email --

MFMailComposeViewController *k = [MFMailComposeViewController alloc];
[k init];
[k setSubject:@"Map Data from iPhone"];
[k setMailComposeDelegate:self];
[k addAttachmentData:attachmentData mimeType:@"text/xml" fileName:@"map.xml"];

[k setMessageBody:body isHTML:NO];

[self->controller presentModalViewController:k animated:YES];

For building the XML... I uh, did it myself. Here's some of my methods

-(void)beginElement:(char *)element;
-(void)addAttribute:(char *)attribute value:(char *)attributeValue;
-(void)addText:(char *)text;
-(void)endElement;

(I'd be happy to send you the whole class if you like, though there's perhaps a more recommended way to build xml :) )

Hope that helps point you in the right direction!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文