merci pour vos reponses,,
existe t'il une version de Tidy pour ubuntu ???
Version imprimable
regarde sur le site ou le synaptic d'ubuntu
en convertisant la page de google avec tidy
Ca marche pas trop mal ;)Citation:
tidy.exe -o test.xml -asxml webhp.htm
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94 "html" "head" "|-meta" "|-meta" "|-title" "|-style" "|-script" "body" "|-div" "| |-nobr" "| | |-span" "| | | |-b" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| | | | |-u" "| | | | |-small" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| | |-span" "| | | |-a" "| |-span" "| | |-a" "| |-span" "| | |-a" "| |-span" "| | |-a" "| |-span" "| | |-a" "| |-span" "| | |-a" "|-div" "|-div" "|-div" "| |-nobr" "| | |-b" "| | |-a" "| | |-a" "| | |-a" "|-center" "| |-br" "| |-img" "| |-br" "| |-br" "| |-form" "| | |-table" "| | | |-tr" "| | | | |-td" "| | | | |-td" "| | | | | |-input" "| | | | | |-input" "| | | | | |-input" "| | | | | |-input" "| | | | | |-input" "| | | | | |-br" "| | | | | |-input" "| | | | | |-input" "| | | | |-td" "| | | | | |-font" "| | | | | | |-a" "| | | | | | |-br" "| | | | | | |-a" "| | | | | | |-br" "| | | | | | |-a" "| | | |-tr" "| | | | |-td" "| | | | | |-font" "| | | | | | |-span" "| | | | | | | |-input" "| | | | | | | |-label" "| | | | | | | |-input" "| | | | | | | |-label" "| | | | | | | |-input" "| | | | | | | |-label" "| |-br" "| |-br" "| |-font" "| | |-a" "| | |-a" "| | |-a" "| | |-a" "| |-p" "| | |-font"
salut,,
ce lien http://www.chez.com/xml/htmlt/cloner.htm
???????,,,
ben celui de tidy
http://www.chez.com/xml/htmlt/cloner.htm
Ou tu regarde si il n'est pas dans les paket d'ubuntu avec le synaptic
Le mieux est de passé par QProcess pour lancer tidy et QFile pour ouvrir le résultat et le donné au QDomDocument
http://qt.developpez.com/faq/?page=q...ir_application
:koi:
PyQt4???? pourquoi tu veut utiliser PyQt4?
si c'est un autre problème, ouvre un nouveau thread, stp.
salut ,,
j'ai modifier le button2 de l'exemple http://qt.developpez.com/faq/?page=q...ir_application
comme suit:
c'est pour convertir la page HTML au page XML par Tidy est ça merche ,Code:MyQPushButton bouton2("Ouvrir tidy","tidy -o test.xml -asxml test.html",&w);
mais comment je peut modifier pour appeller tidy dans mon application sans utiliser le button. ??????????
merci pour tout aide
salut,,
j'ai arriver a utiliser Tidy sans le button comme suit:
mais c'est toujour statique c.à.d la page test.html est sur mon disque je veux que la page est celle qui a telecharger dans la fonction void finChargement() comme suit:Code:QProcess::startDetached ("tidy -o test.xml -asxml test.html");
mais j'ai ce message d'erreur :Code:
1
2
3
4
5
6
7 QString frameText = page.mainFrame()->toHtml(); QProcess::startDetached ("tidy -o test.xml -asxml page.mainFrame()->toHtml()"); QDomDocument doc; doc.setContent(frameText); Arbre_DOM(doc.documentElement(),1,0);
Error: Can't open "page.mainFrame()->toHtml()"
j'ai mal ecrit QProcess ou quoi ???
merci pour tout aide,,
merci pour vos reponses,,
j'ai utiliser QProcess pour lancer tidy et QFile pour ouvrir le résultat et le donné au QDomDocument et ça marche tres bien voila les modification apporter a la fonction finChargement()
mais le probleme est a cette instructionCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 void finChargement() { QProcess::startDetached ("tidy -o /home/hiba/dom/test.xml -asxml Google.html"); QFile file ("/home/hiba/dom/test.xml"); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) return; QTextStream out(&file); QString output = out.readAll(); QDomDocument doc; doc.setContent(output); ParcoureArbre_DOM(doc.documentElement() ,0); }
au niveau de Google.html qui se trouve sur mon disque, je veux remplacer Google.html par la page qui va le charger dans la fonction load() (c'est pour N'utilisez pas des pages Web sur mon disque dur mais plutôt des pages réels en ligne),Code:QProcess::startDetached ("tidy -o /home/hiba/dom/test.xml -asxml Google.html");
j'ai essayer de remplacer Google.html par page.mainFrame()->toHtml() ou frameText mais ça donne rien.?????
que faudra faire ???
merci pour tut aide,,
Salut.
Ben tu ecrit un fichier avec ce que tu récupère???
Ou est le problème?? :koi:
Aufait pourquoi utilise tu startDetached??