简体   繁体   English

如何定期更新xml文件?

[英]How can I update an xml file periodically?

Hy, I have to make a query on a Facebook table witch will return xml information about number of likes and so on.I have to keep those info in database or in a xml file on the disc and every day at a certain hour i have to update those dates. 嗨,我必须在Facebook表上进行查询,女巫将返回有关点赞次数等信息的xml信息。我必须将这些信息保存在数据库中或存储在光盘上的xml文件中,每天在某个特定的时间更新这些日期。 How can i make those updates at a certain time? 如何在特定时间进行这些更新? If the information is very large and i can't store in database,can i store it in a xml file? 如果信息非常大并且我无法存储在数据库中,我可以将其存储在xml文件中吗?

If the amount of data or its volume would prove troublesome for a database, you certainly won't benefit from using XML for storage! 如果数据量或其数量对于数据库来说会很麻烦,那么使用XML进行存储肯定不会受益! Quite the contrary. 恰恰相反。 Find out if perhaps your database supports XML as a column type. 找出您的数据库是否支持XML作为列类型。 If it does, it might supply XPath-based indexing and maybe even updates. 如果是这样,它可能会提供基于XPath的索引,甚至可能提供更新。 If you get the info as XML, maybe some manner of bridging the XML to relational DB gap would be of use. 如果您将信息作为XML获取,则可能会使用某种方式将XML桥接到关系数据库差距。 Using EclipseLink for persistance would provide an excellent bridge in the form of using JAXB together with JPA. 使用EclipseLink作为持久性将以JAXB和JPA一起使用的形式提供一个很好的桥梁。

As for scheduled updates, maybe try to find out if you always need all the info or just a subset. 至于预定的更新,可能会尝试找出您是否总是需要所有信息或只是一个子集。 Even if you can't request partial data, maybe filtering out some stuff you don't need (like with an XSLT transform) could reduce memory footprint and processing time further down the line. 即使你不能请求部分数据,也许过滤掉你不需要的东西(比如使用XSLT转换)可以减少内存占用和处理时间。 Using JPA entities would certainly make synching and updates easier. 使用JPA实体肯定会使同步和更新更加容易。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM