473,466 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Parsing XML

Can some point me to a good example of parsing XML using C# 2.0?

Thanks
Aug 29 '06 #1
5 4274
It really depends what you want to do ;-p

For smaller xml and a richer model, then XmlDocument is your friend:

XmlDocument doc = new XmlDocument();
doc.Load(path);
// or doc.LoadXml(xmlString);

For efficient handling of larger xml, but a much thinner model
(firehose, one element at a time), look at XmlReader over a stream.

Marc

Aug 29 '06 #2
More appropriate should be .Net framework 2 because C# is managed code too.
Hope this help:
http://msdn.microsoft.com/msdnmag/is...n/default.aspx

chanmm
"randy" <ra***@d.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
Can some point me to a good example of parsing XML using C# 2.0?

Thanks

Aug 29 '06 #3


randy wrote:
Can some point me to a good example of parsing XML using C# 2.0?
This <http://www.asp.net/QuickStart/howto/doc/Xml/OverviewofXML.aspx>
should help.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Aug 29 '06 #4
XML is a format which can represent literally any kind of data. The .Net CLR
is rich with various tools for working with various types of XML documents,
and as you might expect, there are different tools for different types of
documents. There are tools for serializing and de-serializing XML-serialized
classes. There are tools for editing and parsing XSL transforms, and tools
for working with XSD style sheet documents as well. In addition, there are
tools for other types of XML documents, and low-level pure XML-parsing
tools. So, it really depends on what you want to do. What sort of XML are
you working with?

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

It takes a tough man to make a tender chicken salad.
"randy" <ra***@d.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
Can some point me to a good example of parsing XML using C# 2.0?

Thanks

Aug 29 '06 #5
Thanks for the post. The xml is from another application. I need to parse
the xml for the following:

1) One XML document received needs to parsed and the data is then sent out
in a new request.
2) The other XML document received will be parsed to be stored in a db
(mapped to a business object) and the document will be sent to the UI to be
displayed to the user using XSL transforms.

I need the parsing to be quick. I playing with the idea of mapping the xml
document into an object for the first scenerio but i thought parsing could
be quicker.

Thanks

"Kevin Spencer" <uc*@ftc.govwrote in message
news:eb**************@TK2MSFTNGP04.phx.gbl...
XML is a format which can represent literally any kind of data. The .Net
CLR is rich with various tools for working with various types of XML
documents, and as you might expect, there are different tools for
different types of documents. There are tools for serializing and
de-serializing XML-serialized classes. There are tools for editing and
parsing XSL transforms, and tools for working with XSD style sheet
documents as well. In addition, there are tools for other types of XML
documents, and low-level pure XML-parsing tools. So, it really depends on
what you want to do. What sort of XML are you working with?

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

It takes a tough man to make a tender chicken salad.
"randy" <ra***@d.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>Can some point me to a good example of parsing XML using C# 2.0?

Thanks


Aug 29 '06 #6

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

Similar topics

8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
16
by: Terry | last post by:
Hi, This is a newbie's question. I want to preload 4 images and only when all 4 images has been loaded into browser's cache, I want to start a slideshow() function. If images are not completed...
0
by: Pentti | last post by:
Can anyone help to understand why re-parsing occurs on a remote database (using database links), even though we are using a prepared statement on the local database: Scenario: ======== We...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
3
by: toton | last post by:
Hi, I have some ascii files, which are having some formatted text. I want to read some section only from the total file. For that what I am doing is indexing the sections (denoted by .START in...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
7
by: Daniel Fetchinson | last post by:
Many times a more user friendly date format is convenient than the pure date and time. For example for a date that is yesterday I would like to see "yesterday" instead of the date itself. And for...
1
by: eyeore | last post by:
Hello everyone my String reverse code works but my professor wants me to use pop top push or Stack code and parsing code could you please teach me how to make this code work with pop top push or...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
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.