Data from SQL & Header from XML???
-
Hello everybody....... The data is stored in the MSSQL 2005 with raw fieldnames like field1, field 2 etc., There is a XML file with Descriptive text for all the fields. Its like I have to fetch the data from the SQL and use the header/description corresponding to the fields from the XML to report it in the .aspx file. I have the data imported via the tableadapter. I should be able to read the XML file and extract the field name and description in to an array. Am Not sure whether this is the right way of doing it??? Even if I could extract, not sure about how to associate the header in the array and the data in the dataset. Any ideas will be sincerely appreciated. thanks in advance.
-
Hello everybody....... The data is stored in the MSSQL 2005 with raw fieldnames like field1, field 2 etc., There is a XML file with Descriptive text for all the fields. Its like I have to fetch the data from the SQL and use the header/description corresponding to the fields from the XML to report it in the .aspx file. I have the data imported via the tableadapter. I should be able to read the XML file and extract the field name and description in to an array. Am Not sure whether this is the right way of doing it??? Even if I could extract, not sure about how to associate the header in the array and the data in the dataset. Any ideas will be sincerely appreciated. thanks in advance.
If you have an xml file, or fragment, why do you need to create an array? Use XDocument, or XElement to navigate the document. If you're not using .net 3.5 XDocument will work also.
only two letters away from being an asset