473,473 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reading XML file and stripping and then updating the values into the sqldatabase using Stored Procedures

Thanks in Advance

I have a XML file which is read from a .aspx page. I need to read through
all the elements, find the values of them and pass them on to the stored
procedure which updates the sql database.

Here the xml file which has to be read.

<transactions>
<smssent time="10:30" subsid="12" dest="07951998960"
id="321">SMScontents</smssent>
<msgtranscribed time="" subsid="12" success="True" length="10"
timetaken="20" bureau="bureau10" agent="agentid"></msgtranscribed>
<emailsent time="" subid="12"></emailsent>
<mmssent time="" subid="12" dest="07951998960"
id="123">MMStextcontents</mmssent>
<vvrecvd time="" subid="12"></vvrecvd>
<vmrecvd time="" subid="12"></vmrecvd>
<ussdsent time="" subid="12" dest="07951998960" id="213"></ussdsent>
<vvnotifysent time="" subid="12"></vvnotifysent>
<vvcollected time="" subid="12"></vvcollected>
</transactions>

In the above example only the smssent element is filled in.

At any point of time, only 1 element is filled with all the attributes, This
can be found out the time attribute id filled and this is a comman in all
the elements.

Can someone please help me on how the reading must take place. As all the
attribute values are strings. i have to convert to the respective data types
and update in the sql database.

Regards
Sunil.


Nov 12 '05 #1
1 1794
Sunil Pathi wrote:
Can someone please help me on how the reading must take place. As all the
attribute values are strings. i have to convert to the respective data types
and update in the sql database.


Well, reading XML is too basic task. MSDN has great tutorial "Reading
XML with the XmlReader"
http://msdn.microsoft.com/library/de...hxmlreader.asp

--
Oleg Tkachenko [XML MVP, XmlInsider]
http://blog.tkachenko.com
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Santah | last post by:
hi I'm new to C++ and I'm currently working on Visual C++ 6.0 I'm trying to open a text file, and read some data from it part of the text file looks like this: --------
1
by: fabrice | last post by:
Hello, I've got trouble reading a text file (event viewer dump) by using the getline() function... After 200 - 300 lines that are read correctly, it suddenly stops reading the rest of the...
4
by: Mike | last post by:
Hello, I'm currently working on debugging a very large DTS package that was created by someone else for the purpose of importing data into my company's database. The data is mainly...
3
by: Ryan.Chowdhury | last post by:
This is a general question regarding the use of view and stored procedures. I'm fairly new to databases and SQL. I've created a SQL database using an Access Data Project ("ADP") and I'm...
8
by: Carl | last post by:
Hi, Using MS Access 2000, is it possible to run a UPDATE or INSERT SQL query using some form of conditional IF THEN ?? for example: SELECT * FROM Books IF EXISTS(Select Books.ID = 1)
0
by: Jim dunn | last post by:
HI I am having problems with C# with regards to its compatibility with win32 API methods, I am trying to read from a windows CE comm port using C# and imported methods from coredll.dll, it seems...
1
by: Ian | last post by:
Hi, Am having trouble retrieving a value from a config file using VC# 2005. app.config file (as created using 'Settings' tab on Project properties page) is as follows: <?xml version="1.0"...
2
by: XML Beginner | last post by:
I have an XML file that contains values that my application needs, so it knows which database to connect to. It also contains a configuration option so that I can specify which node to return...
5
by: Bill Schanks | last post by:
I have a winform app (VB 2005) that allows users to export data to excel, make updates to the excel file and import the data from that Excel file and update the database. My question is: Is it...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.