Qt xmlWriter/xmlReader [英] Qt xmlWriter/xmlReader

查看:36
本文介绍了Qt xmlWriter/xmlReader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Qt 编写和读取一个 xml 文件.有没有简单的示例代码,动态生成一个XML文件?

I want to write and read an xml file using Qt. Is there a simple example code, which generates an XML file dynamically?

我找到了一些 Qt xml 类,但有人知道它们习惯于什么吗?是否有使用这些类的简单示例?

I've found some Qt xml classes, but does anybody know what they are used to and is there an easy example which uses these classes?

QtXml Module (http://doc.qt.nokia.com/latest/qtxml.html)
QXmlStreamReader (http://doc.qt.nokia.com/4.7/qxmlstreamreader.html)
QXmlStreamWriter (http://doc.qt.nokia.com/4.7/qxmlstreamreader.html)

我已经编写了托管 C++ 代码,但我的问题是此代码(需要使用/clr)不支持 Visual Studio 2010 中的 IntelliSense.现在我尝试寻找替代方法.如果有人知道一些功能几乎相同的东西,只使用非托管代码,那就完美了!

I've written a managed C++ code, but my problem is that this code (using /clr required) does not support IntelliSense in Visual Studio 2010. Now I try to find an alternative. If anybody knows something which has almost the same functions, only using unmanaged code, would be perfect!

此外我发现了这个,但真的不知道如何使用它:QString到 QT 中的 XML

Moreover I've found this, but don't really know how to use it: QString to XML in QT

推荐答案

感谢您的回答!

我找到了这些使用诺基亚 QT 生成和读取 XML 文件的链接:

I've found these links for generating and reading XML files using QT from Nokia:

编写 XML 文件:http://developer.nokia.com/community/wiki/Generate_XML_programatically_in_Qt

读取 XML 文件:http://www.developer.nokia.com/Community/Wiki/Using_QXmlStreamReader_to_parse_XML_in_Qt

这是在编写和读取 XML 文件时使用的 QT 类:

This are the QT classes used, when writing and reading XML files:

http://doc.qt.nokia.com/4.7/qxmlstreamwriter.html

http://doc.qt.nokia.com/4.7/qxmlstreamreader.html

这篇关于Qt xmlWriter/xmlReader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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