Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / March 2008

Tip: Looking for answers? Try searching our database.

How to transform large XML file? using .net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
raj@aol.com - 12 Mar 2008 01:21 GMT
we have a 3 gig of xml data. we need to transform this data using our XSL
file.
when i use the regular transform methods of course i run out of memeory.

the XSL file has quite bit of rules so i really cannot move them in to my
code.
is there way to transform the file streamingly?

thanks.
John Saunders [MVP] - 12 Mar 2008 03:00 GMT
> we have a 3 gig of xml data. we need to transform this data using our XSL
> file.
[quoted text clipped - 3 lines]
> code.
> is there way to transform the file streamingly?

Not using XSL. You can, of course, read the file using  an XmlReader, and
write it using an XmlWriter. This will work, no matter how large the file
is.

Also, if you're aware of the structure of the data in the file, you may find
that you don't need the full generality of XSL. Among other things, there
may be large sections of the file that would not have been modified. You can
read and write those without having to touch them.
Signature

--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Martin Honnen - 12 Mar 2008 13:42 GMT
> we have a 3 gig of xml data. we need to transform this data using our XSL
> file.
[quoted text clipped - 3 lines]
> code.
> is there way to transform the file streamingly?

Not with .NET's XslCompiledTransform. However the commercial version of
Saxon (currently version 9) <URL:http://www.saxonica.com/> has a
streaming mode
<URL:http://www.saxonica.com/documentation/sourcedocs/serial.html>.
And you have already been pointed to XmlReader and XmlWriter as an
alternative to XSLT.

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.