Hi,
I have an xml file (a subset is pasted below) which is created by exporting data from a dataset, i am trying to edit a certain Node based upon a criteria, the syntax used to find the node is as follows
Dim nod As XmlNode = xd.SelectSingleNode("/Questions/[ColumnKey='" & row.Item("ColumnKey") & "']")
however it returns an error, can anyone advise where i am going wrong please.
Thanks
- <NewDataSet>
+ <xs:schema id="NewDataSet" xmlns="" xmlns:xs=" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Questions" msdata:UseCurrentLocale="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="NQAI_Questions">
- <xs:complexType>
- <xs:sequence>
<xs:element name="AuditDate" type="xs:string" minOccurs="0" />
<xs:element name="IDwa" type="xs:string" minOccurs="0" />
<xs:element name="IDbe" type="xs:string" minOccurs="0" />
<xs:element name="ID_Question" type="xs:string" minOccurs="0" />
<xs:element name="Result" type="xs:string" minOccurs="0" />
<xs:element name="Cust" type="xs:string" minOccurs="0" />
<xs:element name="Status_Uploaded" type="xs:string" minOccurs="0" />
<xs:element name="ColumnKey" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
- <Questions>
<AuditDate>26/07/2010 00:00:00</AuditDate>
<ID_Ward>A</IDwa>
<ID_Bed>B1</IDbe>
<ID_Question>1</ID_Question>
<Result>N/A</Result>
<MPI>772989</Cust>
<Status_Uploaded>No</Status_Uploaded>
<ColumnKey>26/07/2010 00:00:00AB11N/A772989</ColumnKey>
</Questions>
I have an xml file (a subset is pasted below) which is created by exporting data from a dataset, i am trying to edit a certain Node based upon a criteria, the syntax used to find the node is as follows
Dim nod As XmlNode = xd.SelectSingleNode("/Questions/[ColumnKey='" & row.Item("ColumnKey") & "']")
however it returns an error, can anyone advise where i am going wrong please.
Thanks
- <NewDataSet>
+ <xs:schema id="NewDataSet" xmlns="" xmlns:xs=" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="Questions" msdata:UseCurrentLocale="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="NQAI_Questions">
- <xs:complexType>
- <xs:sequence>
<xs:element name="AuditDate" type="xs:string" minOccurs="0" />
<xs:element name="IDwa" type="xs:string" minOccurs="0" />
<xs:element name="IDbe" type="xs:string" minOccurs="0" />
<xs:element name="ID_Question" type="xs:string" minOccurs="0" />
<xs:element name="Result" type="xs:string" minOccurs="0" />
<xs:element name="Cust" type="xs:string" minOccurs="0" />
<xs:element name="Status_Uploaded" type="xs:string" minOccurs="0" />
<xs:element name="ColumnKey" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
- <Questions>
<AuditDate>26/07/2010 00:00:00</AuditDate>
<ID_Ward>A</IDwa>
<ID_Bed>B1</IDbe>
<ID_Question>1</ID_Question>
<Result>N/A</Result>
<MPI>772989</Cust>
<Status_Uploaded>No</Status_Uploaded>
<ColumnKey>26/07/2010 00:00:00AB11N/A772989</ColumnKey>
</Questions>