
22/03/2005, 04:51
|
| | Fecha de Ingreso: junio-2003 Ubicación: Asturias
Mensajes: 2.429
Antigüedad: 21 años, 10 meses Puntos: 7 | |
Yo lo estoy intentando asi:
Dim objXML as XmlDocument = New XmlDocument
objXML.Load(Path)
Dim NodPrincipal As XmlNode
Dim Nod As XmlNode
Nod = objXML.CreateElement("sitio")
Nod.Attributes("nombre").Value = "EEE"
Nod.Attributes("servidor").Value = "serv"
Nod.Attributes("usuario").Value = "usu"
Nod.Attributes("clave").Value = "clave"
NodPrincipal = objXML.DocumentElement.SelectSingleNode("/sitios")
NodPrincipal.AppendChild(Nod)
objXML.Save("Sitios.xml")
Pero nada, me salta el siguiente error:
Referencia a Objeto no establecida como instancia de un objeto.
Este error se genera cuando llega a la parte de: Nod.Attributes("nombre").Value = "EEE"
Hasta que llega ahi, todo funciona perfectamente.
__________________ Charlie.
Última edición por chcma; 22/03/2005 a las 05:03 |