自动化 xml 导入的正确方法是什么 [英] what would be the proper way to automate an xml import

查看:33
本文介绍了自动化 xml 导入的正确方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个脚本,通过从源磁盘中选择数据并通过按钮提交上传,将数据从 xml 文件导入到 mysql 数据库中.但是,如果要使用 3rd 方应用程序来自动执行此导入呢?检查 xml 路径的 get 参数是否存在并获取其内容并以与我以前相同的方式导入是否合适?或者有更好的方法吗?

I've written a script that imports data from an xml file into the mysql database by selecting it from the source disk and uploading it via a button submital. But what if a 3rd party application were to be used to automate this import. Would it be proper to check if a get parameter of a xml path exist and grab its content and import the same way i did before? or is there a better method?

通过获取参数我的意思是这样的:

by get parameter i mean like this:

http://domain.com/import.php?path=externaldomain.com/xml/page.xml

推荐答案

这取决于您要导入的数据类型.如果您从 rss 提要导入数据,则此方法没问题.但如果您要导入个人数据,这可能不是一个好方法.

it depends on what kind of data you are importing. If you import data from an rss feed, this method is fine. But if you are going to import personal data this might not really be a good method.

如果您正在处理其他人不应该看到的关键数据,我会建议使用更安全的方法.您可以开始考虑通过 ftp 导入 xml 文件,从服务器安全文件夹后面下载它们.要求第 3 方应用程序将 xml 文件上传到您选择的安全位置.任何在某种安全性背后进行的事情都比建议的个人数据方法更好.

I would suggest something more secure if you are working with critical data that others are not supposed to see. You can start thinking of importing the xml files through ftp, download them from behind a server secured folder. Ask the 3rd party application to upload the xml files to a secure location of your choosing. Anything that goes on behind some kind of security is better then the suggested method for personal data.

这篇关于自动化 xml 导入的正确方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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