We help IT Professionals succeed at work.
Get Started

Updating XML with database information

Aleks
Aleks asked
on
114 Views
Last Modified: 2015-07-20
I have a Blob in my database which contains an XML string, with names of fields and their values.
Some of those fields match fields in tables in my database. like say 'name' or 'address', etc. and other fields are not matched to my database but info that is relevant for other purposes.

We have a routine to send this XML string to a web service to be processed. BUT we need to do this BEFORE we send the XML to the web service.

We need to update the XML with the information we have in our database, THEN send it to the web service, this update only applies to the fields that match fields in the database, so that the name of the field is the same, then we need to update the value in the XML with the value we have in the database.

This is because often times the information in the database changes, like addresses, phone numbers, etc. And when we saved the Blob (XML) it had old numbers or addresses. This way when we send the XML for processing we are sending it with the NEW information and not the old one.

We just don't know how to create code to update the fields in the XML that match fields in our database.
We have a table (UserMap) which has the list of all the fields we have in the DB.

We are using MS SQL 2008 R2
Comment
Watch Question
Senior Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE