Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML to datarow
Message
 
 
À
14/05/2013 08:47:26
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01573699
Message ID:
01573804
Vues:
43
>Don't know what you get when you run this. The GroupMember elements will be written to Table[1].
>
>>Also, I may need to save all information into the table - here I am a bit lost because the new datatable I receive has different order of the columns than the actual table. Is there a way to save info without listing every individual column?
>
>This goes back to my earlier post. You will still have to 'manually' move the elements from the ReadXML table into the actual table.
>Still think it better to create a row for the real table and populate it from the XML using one of the XML libraries.....

When I test the above in the LinqPad this is the output I got - notice, that we don't get back the GroupMembers column:
ACCOUNT:  
ADDIT_NO:  
AMT_PAID:  
BACKCOLOR:  33023
BASE_ID:  
BOOKING_ID:  1921000000.00000
CATEGORY:  ADULTPROG
CHECKED_IN:  01/01/1900 12:00:00 AM
CLIP_LOC:  
CLIP_SP:  
CLUSTER:  1868
CRITERIA1:  
CRITERIA2:  
CRITERIA3:  
CRITERIA4:  
CRITERIA5:  
CRITERIA6:  
CRITERIA7:  
DATE_TIME:  05/13/2013 01:54:10 PM
DEPARTMENT:  ACTIVITIES
DISPLAY_MSG:  P Spade Sam Book Many Pod 1921000000
END_TIME:  05/13/2013 05:00:00 PM
EXPERIENCE:  
EXPORTD_ON:  01/01/1900 12:00:00 AM
FIRST_NAME:  SAM
FLEX_TSPAN:  
FORECOLOR:  
tcactionlist_Id:  0
GST_NAME:  Spade Sam
GUEST_NO:  1897000000
GUEST_NO1:  1897000000.00000
IS_POD:  .T.
ISNOTES:  
ITEM:  BOOKMANY
LAST_NAME:  SPADE
LAYER:  3
LESSONTYPE:  17
LOC_ID:  
LOCKED_A:  
LOCKED_B:  
LSN_CAT:  G
LSNDESCRIP:  Book Many Pod
MASTERBOOK:  1921000000
MISC_LEVEL:  
NOTELENGTH:  
NOTES:  
NUM_ADDIT:  4
OPERATOR:  MIKEG
PAIDSTATUS:  P
PAY_STATUS:  
POD_INSTR:  
POD_PREFS:  
PODBKTYPE:  3
PREF_LVL1:  
PREF_LVL10:  
PREF_LVL11:  
PREF_LVL12:  
PREF_LVL2:  
PREF_LVL3:  
PREF_LVL4:  
PREF_LVL5:  
PREF_LVL6:  
PREF_LVL7:  
PREF_LVL8:  
PREF_LVL9:  
PRICE:  
QUANTITY:  4
REFRD_BY:  
REQUEST:  
REQUESTED:  
RESERV_NO:  0
RESOURCE1:  BOOKMANY
RESRC_REQ1:  
SALESPOINT:  TKT02
SEX:  
SNB_LEVEL:  
START_TIME:  05/13/2013 03:30:00 PM
TCH_LEVEL:  
TELE_LEVEL:  
TEMP_NAME:  
TIMESLOT:  
TO_REVENUE:  01/01/1900 12:00:00 AM
TRANS_NO:  114007000
UPG_BY:  
WHICHLEVEL:  
XLD_END:  01/01/1900 12:00:00 AM
XLD_START:  01/01/1900 12:00:00 AM
XTRA_BOOKS:  
So, I decided to use different approach. We have a Dictionary extension (Gregory helped to perfect code in it) to parse the above XML like output into Dictionary (String, String). So, this is what I am using for now.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform