Re: Method to compare two XML documents

Discussion in 'XML' started by GrinKore, Nov 4, 2003.

  1. GrinKore

    GrinKore Guest

    I forgot to mention, I'm using msxml3.dll library for xml dom.

    "GrinKore" <> wrote in message
    news:...
    > Hello, I'm working on the intranet document imaging application where

    every
    > 24 hours my program scans all network servers for various documents and
    > creates raster images of them to be placed on company's intranet server.
    >
    > I have created ActiveX DLL that scans FSO and returns XML document as

    a
    > manifest of all compatible document files stored on those servers. See
    > attached sample XML output for more details.
    >
    > What I want to do is to compare two xml documents so that I can
    > determine what files have changed since last scan. Since production system
    > has to be able to handle 100,000 + nodes looping through both XML

    documents
    > takes considerable amount of time. Is there any other ways to do this?
    >
    > Thanks in advance...
    >
    >
    >
    >
    >
     
    GrinKore, Nov 4, 2003
    #1
    1. Advertising

  2. GrinKore

    Dag Sunde Guest

    "GrinKore" <> wrote in message
    news:...
    > I forgot to mention, I'm using msxml3.dll library for xml dom.
    >
    > "GrinKore" <> wrote in message
    > news:...
    > > Hello, I'm working on the intranet document imaging application where

    > every
    > > 24 hours my program scans all network servers for various documents and
    > > creates raster images of them to be placed on company's intranet server.
    > >
    > > I have created ActiveX DLL that scans FSO and returns XML document

    as
    > a
    > > manifest of all compatible document files stored on those servers. See
    > > attached sample XML output for more details.
    > >
    > > What I want to do is to compare two xml documents so that I can
    > > determine what files have changed since last scan. Since production

    system
    > > has to be able to handle 100,000 + nodes looping through both XML

    > documents
    > > takes considerable amount of time. Is there any other ways to do this?
    > >


    You might consider using DOM on only one of the documents, and use SAX
    on the other one. Set up a SAX tag-handler on the <file> and <Folder>
    tags...

    DOM Reads the whole tree into memory, and is very slow!
    msXml 3 comes with a SAX parser too...

    BTW... The document you attached is *not* well-formed xml, but it
    illustrated
    your point.

    --
    Dag.
     
    Dag Sunde, Nov 4, 2003
    #2
    1. Advertising

  3. GrinKore

    GrinKore Guest

    Can you point me to a right direction regarding msxml3 SAX tag handler. I'm
    not very familiar with sax. Thanks...


    "Dag Sunde" <> wrote in message
    news:3fa7b9f6$...
    > "GrinKore" <> wrote in message
    > news:...
    > > I forgot to mention, I'm using msxml3.dll library for xml dom.
    > >
    > > "GrinKore" <> wrote in message
    > > news:...
    > > > Hello, I'm working on the intranet document imaging application where

    > > every
    > > > 24 hours my program scans all network servers for various documents

    and
    > > > creates raster images of them to be placed on company's intranet

    server.
    > > >
    > > > I have created ActiveX DLL that scans FSO and returns XML document

    > as
    > > a
    > > > manifest of all compatible document files stored on those servers. See
    > > > attached sample XML output for more details.
    > > >
    > > > What I want to do is to compare two xml documents so that I can
    > > > determine what files have changed since last scan. Since production

    > system
    > > > has to be able to handle 100,000 + nodes looping through both XML

    > > documents
    > > > takes considerable amount of time. Is there any other ways to do this?
    > > >

    >
    > You might consider using DOM on only one of the documents, and use SAX
    > on the other one. Set up a SAX tag-handler on the <file> and <Folder>
    > tags...
    >
    > DOM Reads the whole tree into memory, and is very slow!
    > msXml 3 comes with a SAX parser too...
    >
    > BTW... The document you attached is *not* well-formed xml, but it
    > illustrated
    > your point.
    >
    > --
    > Dag.
    >
    >
     
    GrinKore, Nov 4, 2003
    #3
  4. GrinKore

    Dag Sunde Guest

    "GrinKore" <> wrote in message
    news:...
    > Can you point me to a right direction regarding msxml3 SAX tag handler.

    I'm
    > not very familiar with sax. Thanks...
    >


    Fun with sax:
    http://msdn.microsoft.com/library/d...en-us/dnexxml/html/xml08212000.asp?frame=true

    This is not a sax-link, but about msxml3 & performance:
    http://msdn.microsoft.com/library/d...en-us/dnexxml/html/xml02212000.asp?frame=true

    Sax JumpStart (C++):
    http://msdn.microsoft.com/library/d...-us/dnmsxml/html/sax2jumpstart.asp?frame=true

    and finally, The MSDN SAX2 developers Guide:
    http://msdn.microsoft.com/library/d.../sax2_developersguide_overview.asp?frame=true

    --
    Dag.

    >
    > "Dag Sunde" <> wrote in message
    > news:3fa7b9f6$...

    <snipped/>
     
    Dag Sunde, Nov 4, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Ransburg

    Compare & Merge XML documents

    Michael Ransburg, Feb 16, 2004, in forum: Java
    Replies:
    0
    Views:
    431
    Michael Ransburg
    Feb 16, 2004
  2. Nick Kew
    Replies:
    0
    Views:
    813
    Nick Kew
    Nov 4, 2003
  3. GrindKore
    Replies:
    2
    Views:
    425
    Nick Kew
    Aug 10, 2004
  4. GenxLogic
    Replies:
    3
    Views:
    1,380
    andrewmcdonagh
    Dec 6, 2006
  5. Replies:
    4
    Views:
    589
    delirio
    Jun 26, 2007
Loading...

Share This Page