期刊文献+

基于QT的XML文件自动转换方法 被引量:1

QT-based Automatic Conversion Method of XML Files
下载PDF
导出
摘要 为简单方便的将XML文件转换为C++的对象实例,提出一种将XML文件和C++对象之间互相转换的方法。研究XML文件的结构和Q T的元类型系统,以XML根节点为开始,采用深度优先读取算法遍历XML文件的每个节点,将节点内容和节点属性组装到C++对象实例,保留XML文件的元素间的嵌套关系,可以根据该关系读取整个XML文档,也可以根据需要只读取对应节点的内容。最后通过实例验证该方法的正确性和有效性,演示该方法的简单、高效。 In order to convert XML files into object instances of C++,this paper presents an interconversion method between XML files and C++objects.The structure of XML file and the metatype system of QT are studied.Starting with the XML root node,each node of XML file is traversed by depth-fi rst reading algorithm.The content and attributes of node are assembled into C++object instances.The nested relationship among elements of XML fi le is preserved.The whole XML fi le can be read according to this relationship,or only the content of the corresponding node can be read as needed.Finally,an example is given to verify the correctness and validity of the method and demonstrate its simplicity and effi ciency.
作者 王宏明 林卫永 王泉荣 温业中 Wang Hongming;Lin Weiyong;Wang Quanrong;Wen Yezhong(CRSC Wanquan Signal Equipment Co.,Ltd.,Hangzhou 310000,China)
出处 《铁路通信信号工程技术》 2021年第2期88-92,共5页 Railway Signalling & Communication Engineering
关键词 可扩展标记语言 XML QT 转换 C++ 动态实例 元类型系统 extensible markup language XML QT conversion class C++ dynamic instance metatype system
  • 相关文献

参考文献8

二级参考文献44

  • 1刘文,甘志春,李文,王更辉.基于XML和JSON的格式化网络参数文件研究[J].计算机与网络,2013,39(24):54-57. 被引量:6
  • 2吕腾,顾宁,闫萍.XML文档的范式[J].小型微型计算机系统,2004,25(10):1836-1840. 被引量:8
  • 3吴永辉.消除结构冗余的XML数据库模式规范化设计[J].计算机研究与发展,2004,41(10):1809-1814. 被引量:10
  • 4张涛,黄强,毛磊雅,高兴.一个基于JSON的对象序列化算法[J].计算机工程与应用,2007,43(15):98-100. 被引量:58
  • 5Haro1dER 著.XML实用大全.杜大鹏等译[M].北京:中国水利水电水电出版社,2000.48-68,746-752. 被引量:1
  • 6张忠平 曹顺良 李荣.基于约束的XML模式规范化研究[J].计算机科学,2003,30:35-40. 被引量:5
  • 7Arenas M, Libkin L. A normal form for XML documents [A]. Popa L. Proceedings of the 21th ACM SIGACT- SIGMOD-SIGART Symposium on Principles of Database Systems ( PODS' 02 ) [ C ]. Madison, Wisconsin, USA: ACM press, 2002:85 - 96. 被引量:1
  • 8Lee M L, Ling T W, Low W L. Designing functional dependencies for XML[A]. Jensen C S. Proceedings of the Advances in Database Technology-EDBT 2002, 8th International Conference on Extending Database Technology. Lecture Notes in Computer Science 2287 [ C ]. Prague, Czech Republic: Springer, 2002 : 183 - 201. 被引量:1
  • 9Vincent M W, Liu J, Liu C. Multivalued dependencies and a 4NF for XML[A]. Eder J, Welzer T. Proceedings of the 15th Conference on Advanced Information Systems Engineering(CAISE 2003), Klagenfurt/Velden, Austria. Lecture Notes in Computer Science 2681[C]. Heidelberg, Berlin: Springer-Verlag, 2003 : 14 - 29. 被引量:1
  • 10Vincent M W, Liu J, Liu C. A redundancy free 4NF for XML[A]. Bellahsene Z. Proceedings of Database and XML Technologies, Second International XML Database Symposium ( XSym 2003 ), Berlin, Germany. Lecture Notes in Computer Science 2824 [ C ]. Heidelberg, Berlin: Springer-Verlag, 2003 : 254 - 266. 被引量:1

共引文献37

同被引文献3

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部