hello,
I'm a bit of a noob about this, but I really need to know this. My problem:
I have some xmldata in a database. It has 3 columns: ID(primary key),contact(foreign key to a contact table),data(here is the xml data)
when i try to show all data of a certain contact, i get alle the rows referring to the contact. What I did in vb2003 was this:
i needed to be able to identify the dataID, because a user has to be able to edit the data. So thats why i added the id attribute when retrieving the xml form the database. This worked fine in vb2003.
The problem is that in vb2005 xmldata.document has become obsolete. It suggests to use a xpathnavigator, but the properties of the nagivator are all read-only. So that way i am unable to add the id attribute. Is there any way to get around this? of should i approach this in a completely different way?
any help would be greatly appreciated....
I'm a bit of a noob about this, but I really need to know this. My problem:
I have some xmldata in a database. It has 3 columns: ID(primary key),contact(foreign key to a contact table),data(here is the xml data)
when i try to show all data of a certain contact, i get alle the rows referring to the contact. What I did in vb2003 was this:
VB.NET:
Dim attribute As System.Xml.XmlAttribute
xmlstring = ""
XmlData.DocumentContent = "<alldata></alldata>"
For i = 0 To (dsGegevens.Gegevens.Rows.Count - 1)
If dsGegevens.Gegevens.Rows(i).Item("Contact") = contactId Then
XmlData.Document.FirstChild.InnerXml &= dsGegevens.Gegevens.Rows(i).Item("data")
attribute = XmlData.Document.CreateNode(System.Xml.XmlNodeType.Attribute, "ID", XmlData.Document.NamespaceURI)
attribute.Value = dsGegevens.Gegevens.Rows(i).Item("ID")
XmlData.Document.FirstChild.LastChild.Attributes.Append(attribute)
End If
Next
XmlData.TransformSource = "gegevensoverzicht.xslt"
i needed to be able to identify the dataID, because a user has to be able to edit the data. So thats why i added the id attribute when retrieving the xml form the database. This worked fine in vb2003.
The problem is that in vb2005 xmldata.document has become obsolete. It suggests to use a xpathnavigator, but the properties of the nagivator are all read-only. So that way i am unable to add the id attribute. Is there any way to get around this? of should i approach this in a completely different way?
any help would be greatly appreciated....