salve ragazzi.
Sto' sperimentando con il gb.xml e per ora la lettura del file mi risulta abbastanza agevole:
PercorsoFileXML = User.Home & "/ChannelPresets.xml"
Public Sub LoadPresetList(fileXML As String)
Dim reader As XmlReader
Dim ID As Integer
Dim Nome As String
Dim LoopClip As String
Dim PromoClip As String
Dim AddPromo As Integer
Dim PromoCounter As Integer
Dim LogoImage As String
Dim AddLogo As Integer
Dim LogoPosition As Integer
Dim ChannelRootfolder As String
reader = New XmlReader
Try reader.Open(fileXML)
If Error Then
Message.Error("Error when trying to open the " & fileXML & " file!")
Return
Endif
Do While True
Try reader.Read()
If reader.Eof Then Break
Select Case reader.Node.Name
Case "channel"
For Each reader.Node.Attributes
If reader.Node.Name = "id" Then id = reader.Node.Value
If reader.Node.Name = "name" Then Nome = reader.Node.Value
'etc etc
Next
ComboBox_Channel.Add(nome, id)
End Select
Loop
reader.Close()
End
il file xml che ho scritto a mano con leafpad e' questo:
<?xml version="1.0" encoding="UTF-8" ?>
<Canali>
<channel
id="1"
name="Galileo Citta'"
LoopClip="/mnt/Qnap1Multimedia/03_Playout/_INTERVALLI_/video loops/loop_GalCitta.mpg"
PromoClip="/mnt/Qnap1Multimedia/03_Playout/_SIGLE_/Spot_sigle canali ok/GalileoCitta.mpg"
AddPromo="1"
PromoCounter="1"
LogoImage="/mnt/Qnap1Multimedia/03_Playout/_SIGLE_/Spot_sigle canali ok/loghi canali mux definitivi/overlay su 4_3 PAL/Galileocitta_LowRight_v3.png"
AddLogo="1"
LogoPosition="5"
ChannelRootFolder="/mnt/Qnap2OTVA/GalileoCitta"
>
</channel>
<channel
id="2"
name="Galileo Sport"
LoopClip="/mnt/Qnap1Multimedia/03_Playout/_INTERVALLI_/video loops/loop_GalSport.mpg"
PromoClip="/mnt/Qnap1Multimedia/03_Playout/_SIGLE_/Spot_sigle canali ok/GalileoSport.mpg"
AddPromo="1"
PromoCounter="1"
LogoImage="/mnt/Qnap1Multimedia/03_Playout/_SIGLE_/Spot_sigle canali ok/loghi canali mux definitivi/overlay su 4_3 PAL/GalileoSport_LowRight_v3B.png"
AddLogo="1"
LogoPosition="5"
ChannelRootFolder="/mnt/Qnap2OTVA/GalileoSport"
>
</channel>
</Canali>
pero' ancora non ho capito come "aggiungere" record all'XML e/o modificare gli attributi di un singolo "record" .....
qualche esempio illuminante?