Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET3.0 XML
How to Split Xml into Multiple Files(Dynamic) if the file size exceeds 10 MB .
THe Xml should be split with proper nodes and it should be welformed xml.
it should not split from the middle of the xml without any proper nodes.
the below one is my xml structure.
<claimsubmission>
 <Header>
   <first> abc </first>
 </Header>
<claim>
<encounter>
  <facid>1234 </facid>
</encounter>
   <activity>
<start> 1234</start>
  </activity>
   <observation>
      <type>2333</type>
    </observation>
</claim>
<claim>
<encounter>
  <facid>1234 </facid>
</encounter>
<activity>
<start> 1234</start>
  </activity>
   <observation>
      <type>2333<type>
    </type></type></observation>
</claim>
<claim>
<encounter>
  <facid>1234 </facid>
</encounter>
   <activity>
<start> 1234</start>
  </activity>
   <observation>
      
    </observation>
</claim>
</claimsubmission>
 
if it is splitting it should split in the below way not from middle.
First.xml:
<claimsubmission>
 <Header>
   <first> abc </first>
</Header>
<claim>
<encounter>
  <facid>1234 </facid>
</encounter>
   <activity>
<start> 1234</start>
  </activity>
   <observation>
       <Type>2355533</Type>
</observation>
</claim>
</claimsubmission>
 
Secondxml:
<claimsubmission>
 <Header>
   <first> abc </first>
</Header>
<claim>
<Encounter>
  <facID>1234234 </facID>
</Encounter>
   <Activity>
<start> 2221234<start>
  </Activity>
   <observation>
      <Type>2355533</Type>
    </observation>
</claim>
</claimSubmission>

 
third.xml:
<claimsubmission>
 <Header>
   <first> abc </first>
</Header>
<claim>
<Encounter>
  <facID>1234234 </facID>
</Encounter>
   <Activity>
<start> 2221234<start>
  <Activity>
   <observation>
      <Type>2355533</Type>
    </observation>
</claim>
</claimSubmission>
 
fourth.xml
<claimsubmission>
 <Header>
   <first> abc </first>
</Header>
<claim>
<encounter>
  <facid>1234234 </facid>
</encounter>
   <activity>
<start> 2221234<start>
  <activity>
   <observation>
      <type>2355533</type>
    </observation>
</claim>
</claimsubmission>
Posted 25-Jan-12 1:33am
Edited 25-Jan-12 7:48am
v3

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Take a look at this Split large XML files into small files[^] article.
  Permalink  
Comments
Abdul Aziz1234556 at 26-Jan-12 5:04am
   
Thanks for your reply....
 
I have checked this but it is not splitting as welformed xml.it is splitting without proper xml ,from the middle nodes only it gets splitted and remaining is coming in new file .
Please check it and tell me.
 
eg:
first xml:

123
 
second xml:
1223

The above is getting splitted if i am using the above and it is not forming complete xml while splitting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 310
1 OriginalGriff 285
2 Afzaal Ahmad Zeeshan 200
3 Sergey Alexandrovich Kryukov 195
4 BillWoodruff 180
0 OriginalGriff 6,499
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,193
3 Manas Bhardwaj 4,657
4 Maciej Los 4,120


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 25 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100