XML schema - Element name used to identify item problem... - need to use the element name to identify value when importing into SQL 2005 tables
-
I am working on a project for a State Agency where the data is received from multiple private entities and loaded into SQL 2005 tables. The XML schema was designed and published before my involvement with the project and now it cannot be changed. One of the elements to receive (Charges) occurs multiple times within a client but each is for a different concept. Instead of using an attribute to identify the reason for the Charge, they used the element name to do it. For example: <FERTILIZER_CHARGE>2300</FERTILIZER_CHARGE> -- 20 different charge types identified instead of <CHARGE TYPE=”FERTILIZER” AMOUNT=”2300” /> I need to move all the charges to a single table and identify each one with its type but cannot find any examples where the element name is used to update a column in a table. PLEASE HELP!!!