How to do XML Digest with large XML file? - XML SOAP

This is a discussion on How to do XML Digest with large XML file? - XML SOAP ; Hi, I have a XML file about 20MB. When loaded it in IE, it takes several minutes and more than 1G memory. MSXML4.0 is used to create this file, it takes about 100MB memory during creation. Now I want to ...

+ Reply to Thread
Results 1 to 2 of 2

How to do XML Digest with large XML file?

  1. Default How to do XML Digest with large XML file?

    Hi,
    I have a XML file about 20MB. When loaded it in IE, it takes several minutes
    and more than 1G memory. MSXML4.0 is used to create this file, it takes about
    100MB memory during creation. Now I want to add XML digest to this XML file.
    I have looked at http://www.aleksey.com/xmlsec/ and worried of the
    performance. The XMLSec library needs to parse XML before generating digest,
    this may take too long time. Has anybody used XML Digest on large XML file
    before?


  2. Default Re: How to do XML Digest with large XML file?

    Do you want to canonicalize the xml? See http://www.w3.org/TR/xml-c14n for
    more info on canonicalization.

    - If you do not need to canonicalize the xml just feed it to digest method
    without even using MSXML.
    - If you do need to canonicalize the xml then you have to write your own
    canonicalizer in SAX writer interfaces (ISAXContentHandler etc) and then
    feed the resulting stream to the digest method. Of course it is easier to
    say than to implement this. Microsoft does not provide native canonicalizer
    however there is one in .Net.

    Please do not use msxml4 any more you really should be using msxml6 and it
    can be downloaded from
    http://www.microsoft.com/downloads/d...displaylang=en

    The question of why I load a 20 MB file and IE ends up using 1GB question
    coming up many times (with different numbers ). And the answer is under
    the covers IE uses MSXML XML mimeviewer to render the xml to the IE client.
    Rendering is done by first loading the input xml to dom document. Usually,
    you would see 10x-20x the size increase depending of the number of the
    nodes, node to text ratio etc. After that it uses 'default' xslt
    transformation to generate a html file on the file so IE can render it
    correctly. Resulting html will be proportional to the number of nodes in
    original xml. And then IE loads it to IE DOM (not xml dom) in the end 20MB
    file become 1GB. To see that you can use msxsl.exe to transform the input
    xml using msxml3.dll's embeded stylesheet and create an html file and load
    it to IE.
    You can load msxsl.exe from
    http://www.microsoft.com/downloads/d...DisplayLang=en

    --
    Regards,
    - Umut Alev [MSFT]

    This email sent from a machine running Vista RTM.


    "fruitfruit.com" <no_email@fruitfruit.com> wrote in message
    news:1E9FB0B1-37B9-48F9-809E-4E3740DF2A9F@microsoft.com...
    > Hi,
    > I have a XML file about 20MB. When loaded it in IE, it takes several
    > minutes
    > and more than 1G memory. MSXML4.0 is used to create this file, it takes
    > about
    > 100MB memory during creation. Now I want to add XML digest to this XML
    > file.
    > I have looked at http://www.aleksey.com/xmlsec/ and worried of the
    > performance. The XMLSec library needs to parse XML before generating
    > digest,
    > this may take too long time. Has anybody used XML Digest on large XML file
    > before?
    >



+ Reply to Thread

Similar Threads

  1. Can't locate Digest/SHA.pm cannot install Digest/SHA
    By Application Development in forum Perl
    Replies: 4
    Last Post: 11-28-2007, 06:10 PM
  2. BLOB (binary large object) file in Cobol .DAT file
    By Application Development in forum cobol
    Replies: 7
    Last Post: 04-09-2007, 08:50 PM
  3. how to catch file read error in Digest::MD5::addfile?
    By Application Development in forum Perl
    Replies: 1
    Last Post: 07-26-2006, 04:28 PM
  4. Verilog 2001 File I/O: read large file?
    By Application Development in forum verilog
    Replies: 15
    Last Post: 04-06-2006, 09:03 PM
  5. plot of large data file = large .eps file?
    By Application Development in forum Graphics
    Replies: 16
    Last Post: 01-12-2006, 04:37 PM