473,320 Members | 2,111 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,320 software developers and data experts.

Splitting long XML file into smaller pieces

Hello All!

I have a long XML file that I should transmit to other computer using http.
Problem is that the whole XML Document is too large for one
transmitting.

What is the nicest way to split XML document into smaller pieces e.g. to 10
pieces?

XML document is same kind what comes to itäs tags.

E.g.
<main1>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main1>

<main2>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main2>

<main3>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main3>

continues ...

So, how could I read e.g. one main tag with it's subitems one a time?

Br Jenny
Jun 21 '06 #1
2 5001
Jenny,

The XML that you displayed is not valid XML. It doesn't have a root
element. If this is what you are sending down the HTTP pipeline, then I
would recommend in your processing, as you create the separate documents to
send, create separate requests to transfer the documents.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jenny" <Je*****@hotmail.com> wrote in message
news:e7*********@nyytiset.pp.htv.fi...
Hello All!

I have a long XML file that I should transmit to other computer using
http.
Problem is that the whole XML Document is too large for one
transmitting.

What is the nicest way to split XML document into smaller pieces e.g. to
10 pieces?

XML document is same kind what comes to itäs tags.

E.g.
<main1>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main1>

<main2>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main2>

<main3>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main3>

continues ...

So, how could I read e.g. one main tag with it's subitems one a time?

Br Jenny

Jun 21 '06 #2
XML code was sample, no a real one that's why it didn't have a root element
:)

I have one single xml document that is generated by third party vendor.
So I need some kind of technique to split it into smaller parts.

jenny

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:eT**************@TK2MSFTNGP02.phx.gbl...
Jenny,

The XML that you displayed is not valid XML. It doesn't have a root
element. If this is what you are sending down the HTTP pipeline, then I
would recommend in your processing, as you create the separate documents
to send, create separate requests to transfer the documents.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jenny" <Je*****@hotmail.com> wrote in message
news:e7*********@nyytiset.pp.htv.fi...
Hello All!

I have a long XML file that I should transmit to other computer using
http.
Problem is that the whole XML Document is too large for one
transmitting.

What is the nicest way to split XML document into smaller pieces e.g. to
10 pieces?

XML document is same kind what comes to itäs tags.

E.g.
<main1>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main1>

<main2>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main2>

<main3>
<sub1>text</sub1>
<sub2>text</sub2>
<sub3>text</sub3>
</main3>

continues ...

So, how could I read e.g. one main tag with it's subitems one a time?

Br Jenny


Jun 21 '06 #3

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

Similar topics

2
by: Jerry | last post by:
My "main" class is getting a bit long...Is it possble to split a class definition into several files and then import the pieces to get the whole definition? Jerry
6
by: Earl Anderson | last post by:
I have a A97/XP applet I've developed for my own use in my department. My boss "suggests" that since I built it, I share it with and instruct the other 6 members of my department on its use. I've...
11
by: MM | last post by:
Hi I have never written any C programs before, but it seems that I need to do so now. Hope some of you out there can spend a few minutes and help me by writing a simple example of something...
5
by: adhag | last post by:
Hi I am faced with quite a challenge. I need to open a 70-100 meg file and be able to chunk it out using AJAX back to the client but that isn't my problem really. What I need to do is open the...
5
by: hecuba007 | last post by:
My apologies if this question has been asked before .. I would like to split large files into smaller chunks for uploading to php for re-assembly on the server. Is there a (relatively) simple...
2
by: Jenny | last post by:
Hello All! I have a long XML file that I should transmit to other computer using http. Problem is that the whole XML Document is too large for one transmitting. What is the nicest way to...
4
by: nikila | last post by:
Hi, I am trying to split large xml files to smaller xml files using c#.net. can you please provide any sample code for this? I have to split the file if the size is more than 10 MB. Also, xml...
6
by: bleen | last post by:
can someone point me in the right direction here.. I have a script (essentially a giant for loop) that takes about 20 mins to run on my server. I want "split" this process onto a second server...
2
by: Nexus6 | last post by:
How might one go about breaking a 64 bit variable into ever smaller chunks of data? First eight 1 byte variables, from there sixteen 1 nibble variables, down to bits. Is it even possible? A pointer...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.