简体   繁体   English

在FTP服务器上创建XML文件而不创建物理文件本地

[英]Create XML file on FTP server without creating physical file localy

So I want to make XML file on FTP server. 所以我想在FTP服务器上制作XML文件。 I know, that I can do it localy and later just upload it, but I want to make it without local physical file. 我知道,我可以在本地进行此操作,以后再上传即可,但是我想使其不包含本地物理文件。

My code to create it locally was: 我的本地创建代码是:

public class XMLFileMaker {
    public void countryObjectsToXML(Employee emp, String path) throws JAXBException {
        JAXBContext context = JAXBContext.newInstance(Employee.class);
        Marshaller marshaller = context.createMarshaller();
        marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
        marshaller.setProperty("com.sun.xml.bind.xmlDeclaration", Boolean.FALSE);
        marshaller.setProperty("com.sun.xml.bind.xmlHeaders", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
        marshaller.marshal(emp, new File(path + File.separator + "Informations.xml"));
    }
}

Somebody have any ideas how can I solve my problem? 有人有任何想法我该如何解决我的问题?

(Uploading CSV file I have like here: Uploading a csv file to ftp without creating a physical file locally But now I don't have idea how to upload XML :/) (我在这里上传CSV文件的方法是: 将CSV文件上传到ftp而不在本地创建物理文件,但是现在我不知道如何上传XML:/)

FTP is a file transfer protocol, you can move files on server but it does not support file creation. FTP是文件传输协议,可以在服务器上移动文件,但不支持文件创建。 for all available commands type "help" after ftp login. 对于所有可用命令,在ftp登录后键入“ help”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将CSV文件上传到ftp而不在本地创建物理文件 - Uploading a csv file to ftp without creating a physical file locally 如何在 Java 中从另一个文件创建 GZIP 文件而不创建新的物理文件 - How to create a GZIP file in Java from another file without creating a new physical file 动态编译而不创建物理文件 - Dynamic Compiling Without Create Physical File 需要上传一个 xml 文件,解析并存储在数据库中,而不在任何物理物理位置存储文件 - need to upload an xml file, parse and store in database without storing file at any physical physical location 如何发送zip文件而不在实际位置上创建它? - How to send zip file without creating it on physical location? 从字节数组创建文件对象时指定文件名(不创建物理文件) - Specifying the filename while creating a File Object it from byte array (without creating a physical file) 上传文件FTP服务器 - Upload file FTP server 如何使用Struts 2下载语言环境文件 - How to download localy file with Struts 2 将图像作为物理文件存储在服务器上 - storing image as physical file on server 从数据库中读取BLOB(PDF内容)并编辑和输出PDF编辑的文件,而无需创建物理文件 - Read BLOB (PDF Content) from database and edit and output PDF edited file without creating physical file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM