473,382 Members | 1,086 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,382 software developers and data experts.

How to Split a XML file to multiple small XML Files

kb
Hello,

I am trying to split a XML file to multiple small xml files in vb.net
and am trying to get the best possible approach to this. Any help on
this will be great... Sample example on what I am trying to do... Any
help on this will help me a lot. Thank you
KB

Source XML document
--------------------------
<?xml version="1.0" standalone="yes"?>
<SynchronizationObjectsDocument >
<ApplicationArea>
<DocId>dea9593b-4c60-4c1a-ab7f-004a4e336ac5</DocId>
<CreationDateTime>2004-05-13T21:31:48-04:00</CreationDateTime>
</ApplicationArea>
<Data>
<V_CLI_CLIENTS>
<V_CLI_CLIENT>
<ORU_CODE>CLIENT1</ORU_CODE>
</V_CLI_CLIENT>
<V_CLI_CLIENT>
<ORU_CODE>CLIENT2</ORU_CODE>
</V_CLI_CLIENT>
</V_CLI_CLIENTS>
</Data>
</SynchronizationObjectsDocument>

Should split to two xml documents as below
--------------------------------------------------
Document 1:
--------------------------------------------------
<?xml version="1.0" standalone="yes"?>
<SynchronizationObjectsDocument >
<ApplicationArea>
<DocId>dea9593b-4c60-4c1a-ab7f-004a4e336ac5</DocId>
<CreationDateTime>2004-05-13T21:31:48-04:00</CreationDateTime>
</ApplicationArea>
<Data>
<V_CLI_CLIENTS>
<V_CLI_CLIENT>
<ORU_CODE>CLIENT1</ORU_CODE>
</V_CLI_CLIENT>
</V_CLI_CLIENTS>
</Data>
</SynchronizationObjectsDocument>
--------------------
Document 2
--------------------
<?xml version="1.0" standalone="yes"?>
<SynchronizationObjectsDocument >
<ApplicationArea>
<DocId>dea9593b-4c60-4c1a-ab7f-004a4e336ac5</DocId>
<CreationDateTime>2004-05-13T21:31:48-04:00</CreationDateTime>
</ApplicationArea>
<Data>
<V_CLI_CLIENTS>
<V_CLI_CLIENT>
<ORU_CODE>CLIENT2</ORU_CODE>
</V_CLI_CLIENT>
</V_CLI_CLIENTS>
</Data>
</SynchronizationObjectsDocument>
Nov 16 '05 #1
1 3200
Hi KB,

I do not like these classes because you have to write so much for them and
therfore maybe never used them, however with your problem it would be the
first one to look for (and most probably use them).

xmlReader (it reads node by node, attribute by attribute etc)
http://msdn.microsoft.com/library/de...classtopic.asp

and than the XMLwriter
http://msdn.microsoft.com/library/de...classtopic.asp
I hope this helps?

Cor
Nov 16 '05 #2

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

Similar topics

0
by: kumu | last post by:
How to Split a XML file to multiple small XML Files Hello, I am trying to split a XML file to multiple small xml files in vb.net and am trying to get the best possible approach to this. Any help...
3
by: bbulzibar | last post by:
I have a directory filled with XML files. These are small files which contain something like: Code: <date>6/10/2004</date> <name>bbulzibar</name> <computer>Dell</computer> Is there anyway I...
4
by: Carolyn Marenger | last post by:
Hey everyone, I am looking for your thoughts and opinions. Is it preferable to have one css file containing all the style information or break it up into multiple imported files for different...
2
by: marco.avidano | last post by:
I'm asking: for the PHP parser, it's better to create one large file with all the code inside or a lot of small files? Can a large file slow down the execution of the script?
2
by: Jen | last post by:
Trying to take one table in access and split it into multiple excel files(using an excel template); and then email based on email addresses in Table2; Of course, I would like to do all of this...
14
by: vishal | last post by:
Is it possible using any tool to get a single C file containing a combined code of multiple C files. The single file should include the contents of the header file. Example if I have following...
2
by: SenthilVel | last post by:
HI all in my visual studio DOtnet . i am not able to open multiple cs files in the projects , its openings only one cs file at a time, can any one let me know, what setttings i must do in order...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
1
by: PK9 | last post by:
I'm building a windows app using C#. The goal is to merge portions of multiple xml files into one. I currently have an .xsl stylesheet that pulls in the required sections of multiple xml files...
0
by: Sells, Fred | last post by:
the short answer is a file is a module; therefore to 'include' access to 'myclass' in file xyz.py from another file called 'abc.py' you would put this in abc.py import xyz #note no '.py' x =...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.