473,412 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Help with large XML file

Hi,

I am trying to parse out a large and confusing (to me anyway) XML
file. I have worked with small files that have a few nodes, with
elements, but this file is beyond what I know. Here is a small piece
of the XML (it's MUCH larger than this:

<Scoreboard>
<Events>
<Event ID="001212" Name="EventName1" />
<Event ID="001213" Name="EventName2" />
<Event ID="001214" Name="EventName3" />
<Event ID="001215" Name="EventName4" />
</Events>
<EventTypes>
<EventType ID="01" SingleGame="true" Name="EventName1" />
<EventType ID="02" SingleGame="true" Name="EventName2" />
<EventType ID="03" SingleGame="true" Name="EventName3" />
<EventType ID="04" SingleGame="true" Name="EventName4" />
<EventType ID="05" SingleGame="true" Name="EventName5" />
<EventType ID="06" SingleGame="true" Name="EventName6" />
<EventType ID="07" SingleGame="true" Name="EventName7" />
</EventTypes>
<Teams>
<Team ID="11" City="City1" Name="Name1" City="City1"
Nickname="nickname1" Conference="Conference1">
<Player ID="91" />
<Player ID="190" />
<Player ID="77" />
<Player ID="133" />
<Player ID="144" />
<Player ID="195" />
<Player ID="220" />
<Player ID="231" />
<Player ID="214" />
</Teams>
<Team ID="13" City="City2" Name="Name2" City="City2"
Nickname="nickname2" Conference="Conference1">
<Player ID="91" />
<Player ID="190" />
<Player ID="77" />
<Player ID="133" />
<Player ID="144" />
<Player ID="195" />
<Player ID="220" />
<Player ID="231" />
<Player ID="214" />
</Team>
</Teams>
</Scoreboard>

Does anyone have example code on how to parse out the info in this
example?

As I mentioned, this is just a small sample of the file, it is more
complex than this, but if I could get to this stage I could figure the
rest out. All this info must be put into a database.

Thanks,
Steve

Jun 2 '07 #1
2 1191
On Sat, 02 Jun 2007 07:39:59 -0700, gator <gl****@gmail.comwrote:
[...]
Does anyone have example code on how to parse out the info in this
example?
What exactly are you having trouble with? The basic concepts of parsing
the data are the same, regardless of the size of the file.

The sample you've provided has nested values, which you *could* represent
in C# as classes containing references to other classes. For example, a
top-level class "Scoreboard" that contains an array of "Event"s, an array
of "EventType"s, etc. Within the array of "Team" instances, each "Team"
instance would also have an array of "Player"s.

Other than that, I'm having difficulty figuring out exactly what you're
asking here.

Pete
Jun 2 '07 #2
Does anyone have example code on how to parse out the info in this
example?

As I mentioned, this is just a small sample of the file, it is more
complex than this, but if I could get to this stage I could figure the
rest out. All this info must be put into a database.
http://msdn2.microsoft.com/en-us/lib...ch09%20_topic8

You enter into the search box what you're looking for, and it should pull
back some examples.

http://www.codeproject.com/

Jun 2 '07 #3

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

Similar topics

4
by: Tihon | last post by:
Hello! I again need your help, just can't understand whats going on. Got this upload pictures form and it's having problem handling large files (~1.5 - 2 MB). Everything works fine if i just...
3
by: Stuart | last post by:
Hi, Please can anyone help me join 5 large (1.8gb) text files togeather to create 1 very large file. I have some code in PHP but it bombs out at 2gb (seems there is a limit and php needs re...
10
by: comp.lang.php | last post by:
echo mime_content_type('/var/www/html/video/small.mov'); // 1.5mb Quicktime video returns "video/quicktime" echo mime_content_type('/var/www/html/video/huge.mov'); // 10.5mb Quicktime video...
5
by: SStory | last post by:
Hi all, I really needed to get the icons associated with each file that I want to show in a listview. I used the follow modified code sniplets found on the internet. I have left in...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
36
by: felixnielsen | last post by:
What i really wanna do, is defining my own types, it doesnt really matter why. Anyway, i have run into some problems 1) typedef unsigned short U16; U16 test = 0xffffffff; // There should be a...
6
by: comp.lang.php | last post by:
if (!function_exists('bigfile')) { /** * Works like file() in PHP except that it will work more efficiently with very large files * * @access public * @param mixed $fullFilePath * @return...
3
by: Tom | last post by:
My user defined vertical scroll bar does not respond properly. :( public VScrollBar vs; .... vs = new VScrollBar(); vs.Parent = this; vs.Dock = DockStyle.Right; I intercept the scrollbar...
2
by: astrogirl77 | last post by:
Hi, I'm new to Python and am hoping to find help with coding a Python script, applet. I code in an old version of Visual Basic 4.0, I have a simple app that is about 3 and a half pages of code...
1
by: astrogirl77 | last post by:
I'm new to C++ and am hoping to find help with coding a simple C program, am wanting to obtain code and functioning exe's. I code in an old version of Visual Basic 4.0, I have a simple app that...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.