Bonjour,
Possible suite de cette discussion https://www.developpez.net/forums/d1...d-fichier-xml/
Voici mon fichier XML (généré par un concepteur du framework, bref)
Moi je veux extraire les infos du genre la nature de l'objet (button, textbox...) le nom (Name="le nom") la position (Left = "" Width = "" etc...) et etc..
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 <Form Name="Form1" Type="System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Left="15" Top="15" Width="174" Height="300" Text="" BackColorR="240"> <Button Name="Button2" Type="System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Left="19" Top="12" Width="114" Height="57" Text="Button2" BackColorR="0" /> <TextBox Name="TextBox2" Type="System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Left="19" Top="203" Width="100" Height="20" Text="" BackColorR="255" /> <TextBox Name="TextBox1" Type="System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Left="19" Top="177" Width="100" Height="20" Text="" BackColorR="255" /> <Button Name="Button1" Type="System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Left="19" Top="135" Width="120" Height="62" Text="Button1" BackColorR="240" /> </Form>
Comme cela je peux créer mon petit wrapper maison pour que la ligne lue dans le fichier xml
se transforme dans un autre fichier en parallèle en
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part <Form Name="Form1" Type="System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Left="15" Top="15" Width="174" Height="300" Text="hello" BackColorR="240">
Ce qui donne pour ces 5 objets xml le fichier suivant :window/ Form1
.px = "15"
.py = "15"
.tx = "174"
.ty = "300"
.titre = "hello"
create/
End/ window
J'espère que vous pourrez m'aider, je compte sur vous.window/ Form1
.px = "15"
.py = "15"
.tx = "174"
.ty = "300"
.titre = "hello"
create/
End/ window
button/ button2
.px = "19"
.py = "12"
.tx = "114"
.ty = "57"
.titre = "button2"
create/
End/ button
Etc.....
Etc....
Etc......
Bonne soirée
Partager