how to compare two xml files?
-
i have a xml file and i created the treeview and when i click the treeView its corressponding attribute value will be displayed on the tableview i used model for this.now i have to upload two xml files and have to compare its value in the tableview.
if i click treeview in tableview i should be able to view the values two xml files in two colums.i tried creating two models and using the index of one treeview to other but its not working i heard something like proxy model but that also i dont understand i am a newbie so any please help me -
Hi and welcome to devnet,
Why not use two QTreeView in a horizontal layout ? One model per tree view and you are good to go.
-
hi there,thank you for ur reply. but i should have a single treeview and a tableview with 2 colums if i click a item in a treeview it should populate the values of xml files in the correspnding tableview colums
is it posiible to create a treeview with xsd file
i am really confused on how to do this -
@swarnalakshmi said in how to compare two xml files?:
is it posiible to create a treeview with xsd file
No, Qt does not offer this.
Either use XML classes to read the documents and populate the tree nodes yourself, or you might want to Google for
QDomDocument QTreeView
to see if you want to use the former as the model for the latter. -
So you want to create a diff tool for two different trees with only one tree view ?
-
@SGaist yeah there should be one treeView both the xml files will have same schema
and i want to know how to store the xml file attribute values because when i click the treeview it should show corresponding values in tableview -
Did you check the QXmlStream bookmarks example ?