jesusonline
Messages postés6814Date d'inscriptiondimanche 15 décembre 2002StatutMembreDernière intervention13 octobre 2010
-
9 mai 2004 à 18:18
jesusonline
Messages postés6814Date d'inscriptiondimanche 15 décembre 2002StatutMembreDernière intervention13 octobre 2010
-
9 mai 2004 à 18:52
jesusonline
Messages postés6814Date d'inscriptiondimanche 15 décembre 2002StatutMembreDernière intervention13 octobre 201029 9 mai 2004 à 18:52
j'ai trouvé deux solution pour ceux que ca interesse la premiere je l'ai mis en commentaire
donc voici :
Dim doc As New XmlDocument
doc.LoadXml("" & MenuHorizontal.InnerText & "")
'Dim mNodeChild As XmlNode
'mNodeChild = doc.DocumentElement.FirstChild
'Dim i As Integer = 0
'Do Until mNodeChild Is Nothing
' If i = _Category Then
' 'Create a new attribute.
' Dim mAttrib As XmlAttribute = doc.CreateAttribute("id")
' mAttrib.InnerText = "current"
' Dim mAttribCollection As XmlAttributeCollection = doc.DocumentElement.ChildNodes.Item(i - 1).Attributes
' mAttribCollection.Append(mAttrib)
' End If
' mNodeChild = mNodeChild.NextSibling
' i += 1
'Loop
Dim mNodeList As XmlNodeList = doc.SelectNodes("//li")
Dim i As Integer
For Each mNode As XmlNode In mNodeList
If i = _Category Then
Dim mAttrib As XmlAttribute = doc.CreateAttribute("id")
mNode.Attributes.Append(mAttrib).Value = "current"
Exit For
End If
i += 1
Next