Ciao a tutti, sto leggendo e cercando da ieri qualcosa che mi legga in automatico un xml.
Sono arrivato fino ad un certo punto ma poi mi sono bloccato.
Ecco il codice dell'xml
codice:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<info max_attempt="6" refresh="300">Test di configurazione BlueToo project Manager dott. Mariano Cammarota</info>
<thread active="0"></thread>
<actual_devices></actual_devices>
<attempts>
<attempt timestamp="07-07-2010_ore_19-28-39" refused="6" bluetoothAddress="347E39FF37A8" isTrustedDevice="false" />
</attempts>
<messages>
<message commissioner="7web" name="7Web.gif" type="gif" length="42747">
<sends>
<send timestamp="07-07-2010_ore_19-26-11" friendlyName="Narcos77" bluetoothAddress="001E3A2B6FF7" isTrustedDevice="false" />
</sends>
</message>
<message commissioner="7web" name="frimm_giro.gif" type="gif" length="20319">
<sends>
<send timestamp="07-07-2010_ore_19-26-11" friendlyName="Mariano N95" bluetoothAddress="001E3A2B6FF7" isTrustedDevice="false" />
</sends>
</message>
</messages>
</root>
Ho implementato un treeview e questo è il codice:
codice:
<asp:TreeView ID="tvwSample" Runat="server" DataSourceId="xmlData" ExpandDepth="2" MaxDataBindDepth="10" BorderColor="White" BorderStyle="Solid" BorderWidth="1px" Font-Names="Arial" Font-Size="12px">
<DataBindings>
<asp:TreeNodeBinding DataMember="attempts" Text="Tentativi" Value="Tentativi" />
<asp:TreeNodeBinding DataMember="messages" Text="Messaggi" Value="Messaggi" />
<asp:TreeNodeBinding DataMember="message" TextField="commissioner" PopulateOnDemand="True" SelectAction="None" />
<asp:TreeNodeBinding DataMember="sends" Text="Invi Effettuati" Value="Invi Effettuati" />
<asp:TreeNodeBinding DataMember="send" TextField="friendlyName" />
</DataBindings>
</asp:TreeView>
<asp:XmlDataSource ID="xmlData" runat="server" DataFile="~/public/xml/gdfgdf/report/07-07-2010_ore_19-29.xml" CacheDuration="20"></asp:XmlDataSource>
Però purtroppo non riesco a vedere tutti gli attributi.
A me serve creare una lista cosi:
Messaggi: commissioner: 7web - file: frimm_giro.gif
Inviati
timestamp="07-07-2010_ore_19-26-11" - friendlyName="Narcos77"
Spero di essere stato chiari e che qualcuni mi riesca a dare una mano.
Saluti e grazie a tutti