Using VB.net (.net 2.0) I have a string in this format:
record1_field1,record1_field2,record2_field3,record2_field1,record2_field2,
etc...
I wonder what the best (easiest) way is to get this into an xml?
I can think of 2 ways:
Method 1: - use split to get the items in an array - loop through array and build an xml string using concatenation
Method 2: - use split to get the items in an array - loops through array to build a datatable - use writexml to output xml from the datatable
The first sounds pretty simple but would require more logic to build the string.
The second seems slicker and easier to understand.
Are there other ways to do this?