I'm working on a console app that takes an xml file and groups the value of the errorMsg element into an output file (either to the console or to a txt file). My issue is how to parse the value found within the errorMsg Element. (See file sample below). what i need from each errorMsg element value is the table and column the error was generated from (i bolded the fields i need to group by in the xml sample below). Any help given is greatly appreciated. [!--?xml version="1.0" encoding="UTF-8"?--] [curr_transactions_set] [curr_transactions_record] [curr_transaction_id]10101[/curr_transaction_id] [loadid]3010[/loadid] [errormsg]java.sql.SQLException: The INSERT statement conflicted with the FOREIGN KEY constraint "CURR_TRANSACTIONS_FK20". The conflict occurred in database "PDLL", table "dbo.PA_SALES",column 'AGREEMENT_PST'. ErrorCode=547 SQLSTATE=23000 Column:DIR_LABOR_FL_WA, Value:null Column:DEPREC_CC_WA, Value:null Column:DIROTFIX_CST_CC_WA, Value:null Column:PHYS_ITS_VOLUME, Value:0.0000 Column:STORAGE_AND_HANDLING, Value:null [/errormsg] [/curr_transactions_record] [/curr_transactions_set]
Software/Hardware used:
Visual Studio 2010, C#.net
ASKED:
October 27, 2011 1:46 PM
UPDATED:
October 28, 2011 4:36 PM