Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7519223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:51:59+00:00 2026-05-30T01:51:59+00:00

Possible Duplicate: Import XML to SQL using C# I just downloaded about 3000 XML

  • 0

Possible Duplicate:
Import XML to SQL using C#

I just downloaded about 3000 XML files from soap web service and I want to import them into SQL Server. Here is an xml:

<my:SAP_kis_bil>
  <my:sap_code>2223M2F024153</my:sap_code>
  <my:sap_education>11</my:sap_education>
  <my:sap_kron>no</my:sap_kron>
  <my:sap_miltpos>soldier</my:sap_miltpos>
  <my:sap_miltgroup>2</my:sap_miltgroup>
  <my:sap_miltcat>CA</my:sap_miltcat>
  <my:sap_milttermdate>1970-11-20</my:sap_milttermdate>
  <my:sap_miltstartdate>1979-11-20</my:sap_miltstartdate>
  <my:sap_birthdate>1900-09-20</my:sap_birthdate>
  <my:sap_miltno>HZ 2931559</my:sap_miltno>
</my:SAP_kis_bil>

<my:LG_kis_bil>
  <my:lg_code>2223M2F024153</my:lg_code>
  <my:lg_name>John</my:lg_name>
  <my:lg_birthdate>1900-09-20</my:lg_birthdate>
  <my:lg_miltstatus>TECl</my:lg_miltstatus>
  <my:lg_drivingclass></my:lg_drivingclass>
  <my:lg_mobile1>+82316721233</my:lg_mobile1>
</my:LG_kis_bil>

About 3000 xml files like this one. So we have “lg_” and “sap_” and some of them should be sorted in SQL Server as multirow. I already have several sql tables like this:

CREATE TABLE [dbo].[TBL_SAP_XARICI](
    [code] [nvarchar](50) NULL,
    [orgname_x] [nvarchar](100) NULL,
    [orgdiv_x] [nvarchar](100) NULL,
    [orgplace_x] [nvarchar](100) NULL,
    [orgpos_x] [nvarchar](100) NULL,
    [orgstartdate_x] [date] NULL,
    [orgenddate_x] [date] NULL,
    [orgendreason_x] [nvarchar](100) NULL,
    [orgcountry_x] [nvarchar](50) NULL
) ON [PRIMARY]

Now I need to realize (import, transfer) this in C# console application. But this is my first experience. Please help to realize application in C# or just “show the way”. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:52:00+00:00Added an answer on May 30, 2026 at 1:52 am

    Here are the steps (roughly).

    1. Add a web reference to your C# project from Visual Studio (right click web references, add). This will generate all proxy classes to deserialize your xml files.
    2. Deserialize your XML files into objects (see http://msdn.microsoft.com/en-us/library/he66c7f1.aspx)
    3. Persist your objects into the DB (see http://msdn.microsoft.com/en-us/library/ms233812(v=vs.80).aspx)

    Note that step 1 will also create classes to consume the web service, but you don’t really have to use them if you have the output from the SOAP calls already in files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to import contact from gmail using java I want to import
Possible Duplicate: from . import x using __import__ ? How does one do the
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: Import / read / load variables from matlab matfile it C# I
Possible Duplicate: comparing contents of two files using python I have a file name
Possible Duplicate: Why is using a wild card with a Java import statement bad?
Possible Duplicate: Should I use "from package import utils, settings" or "from . import
Possible Duplicate: Best practice: Import mySQL file in PHP; split queries How to import
Possible Duplicate: Why won't this generic java code compile? Given the following code: import
Possible Duplicate: Git over Email I'm new to Git and am interested in using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.