Windows Vista Forums

comparing two XML's using XMLDOM, VBscript
  1. #1


    bnreddy99 Guest

    comparing two XML's using XMLDOM, VBscript

    Hi,



    I wanted to compare two XML's using XMLDOM, VBScript like, taking one
    value from one xml and comparing for the existance in 2nd xml.

    Anyone please provide me the code for this. I am looking for the code
    with XMLDOM objects, VBScript.

    Thanks in advance.

    - thanks

      My System SpecsSystem Spec

  2. #2


    Anthony Jones Guest

    Re: comparing two XML's using XMLDOM, VBscript

    <bnreddy99@xxxxxx> wrote in message
    news:28360412-a4c0-4be0-b94c-673e79dc30c2@xxxxxx

    > Hi,
    >
    > I wanted to compare two XML's using XMLDOM, VBScript like, taking one
    > value from one xml and comparing for the existance in 2nd xml.
    >
    > Anyone please provide me the code for this. I am looking for the code
    > with XMLDOM objects, VBScript.
    >
    It might help if you posted some sample XML that you want to compare.





    --
    Anthony Jones - MVP ASP/ASP.NET



      My System SpecsSystem Spec

  3. #3


    Rama Guest

    Re: comparing two XML's using XMLDOM, VBscript

    On Aug 19, 2:29*am, "Anthony Jones" <A...@xxxxxx> wrote:

    > <bnredd...@xxxxxx> wrote in message
    >
    > news:28360412-a4c0-4be0-b94c-673e79dc30c2@xxxxxx
    >

    > > Hi,
    >

    > > I wanted to compare two XML's using XMLDOM, VBScript like, taking one
    > > value from one xml and comparing for the existance in 2nd xml.
    >

    > > Anyone please provide me the code for this. I am looking for the code
    > > with XMLDOM objects, VBScript.
    >
    > It might help if you posted some sample XML that you want to compare.
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    Hi,

    Any 2 XML's will work. but the script should be in a generic way that
    should be able to compare.

    I am new to this. Please provide me the solution for this.

    one xml can be taken as below:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book category="cooking">
    <title lang="en">Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    <book category="children">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book category="web">
    <title lang="en">XQuery Kick Start</title>
    <author>James McGovern</author>
    <author>Per Bothner</author>
    <author>Kurt Cagle</author>
    <author>James Linn</author>
    <author>Vaidyanathan Nagarajan</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book category="web" cover="paperback">
    <title lang="en">Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
    </book>
    </bookstore>


    and another XML is as below:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book category="cooking">
    <year>2005</year>
    <author>Giada De Laurentiis</author>
    <title lang="en">Everyday Italian</title>
    <price>30.00</price>
    </book>
    <book category="children">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book category="web">
    <title lang="en">XQuery Kick Start</title>
    <author>James McGovern</author>
    <author>Per Bothner</author>
    <author>Kurt Cagle</author>
    <author>James Linn</author>
    <author>Vaidyanathan Nagarajan</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book category="web" cover="paperback">
    <price>39.95</price>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <title lang="en">Learning XML</title>
    </book>
    </bookstore>

    - Thanks

      My System SpecsSystem Spec

  4. #4


    Joe Fawcett Guest

    Re: comparing two XML's using XMLDOM, VBscript

    That's a tall order, a generic difference app. There are XML difference
    utilities around, XmlDiff for example, but I doubt they are something one
    could develop quickly as a favour.
    You maybe lucky however

    --

    Joe Fawcett (MVP - XML)

    http://joe.fawcett.name


    "Rama" <gopi9999@xxxxxx> wrote in message
    news:9262d852-911b-42dd-b227-52c525439a70@xxxxxx
    On Aug 19, 2:29 am, "Anthony Jones" <A...@xxxxxx> wrote:

    > <bnredd...@xxxxxx> wrote in message
    >
    > news:28360412-a4c0-4be0-b94c-673e79dc30c2@xxxxxx
    >

    > > Hi,
    >

    > > I wanted to compare two XML's using XMLDOM, VBScript like, taking one
    > > value from one xml and comparing for the existance in 2nd xml.
    >

    > > Anyone please provide me the code for this. I am looking for the code
    > > with XMLDOM objects, VBScript.
    >
    > It might help if you posted some sample XML that you want to compare.
    >
    > --
    > Anthony Jones - MVP ASP/ASP.NET
    Hi,

    Any 2 XML's will work. but the script should be in a generic way that
    should be able to compare.

    I am new to this. Please provide me the solution for this.

    one xml can be taken as below:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book category="cooking">
    <title lang="en">Everyday Italian</title>
    <author>Giada De Laurentiis</author>
    <year>2005</year>
    <price>30.00</price>
    </book>
    <book category="children">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book category="web">
    <title lang="en">XQuery Kick Start</title>
    <author>James McGovern</author>
    <author>Per Bothner</author>
    <author>Kurt Cagle</author>
    <author>James Linn</author>
    <author>Vaidyanathan Nagarajan</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book category="web" cover="paperback">
    <title lang="en">Learning XML</title>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <price>39.95</price>
    </book>
    </bookstore>


    and another XML is as below:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book category="cooking">
    <year>2005</year>
    <author>Giada De Laurentiis</author>
    <title lang="en">Everyday Italian</title>
    <price>30.00</price>
    </book>
    <book category="children">
    <title lang="en">Harry Potter</title>
    <author>J K. Rowling</author>
    <year>2005</year>
    <price>29.99</price>
    </book>
    <book category="web">
    <title lang="en">XQuery Kick Start</title>
    <author>James McGovern</author>
    <author>Per Bothner</author>
    <author>Kurt Cagle</author>
    <author>James Linn</author>
    <author>Vaidyanathan Nagarajan</author>
    <year>2003</year>
    <price>49.99</price>
    </book>
    <book category="web" cover="paperback">
    <price>39.95</price>
    <author>Erik T. Ray</author>
    <year>2003</year>
    <title lang="en">Learning XML</title>
    </book>
    </bookstore>

    - Thanks



      My System SpecsSystem Spec

  5. #5


    Anthony Jones Guest

    Re: comparing two XML's using XMLDOM, VBscript

    "Joe Fawcett" <joefawcett@xxxxxx> wrote in message
    news:e5B4V8cAJHA.4476@xxxxxx

    > That's a tall order, a generic difference app. There are XML difference
    > utilities around, XmlDiff for example, but I doubt they are something one
    > could develop quickly as a favour.
    > You maybe lucky however
    >

    On top being a tall order, in real world use a generic xml difference tool
    just doesn't have an application. I can't think why anyone would want one.

    OTH, building some kind of 'diff gram' from two chunks of XML that follow
    the same schema and have known semantic rules that can be used to determine
    new, updated and deleted content might be more useful and achievable.


    --
    Anthony Jones - MVP ASP/ASP.NET



      My System SpecsSystem Spec

comparing two XML's using XMLDOM, VBscript problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing folder ACL's Cory Smith PowerShell 4 13 May 2010
are VBscript on Windows server 2003 and VBscript on WS2008 compatible? Francois Lafont VB Script 9 26 Apr 2010
Can a vbscript identify the program/process that called a vbscript MarceepooNu VB Script 15 16 Mar 2010
How to do No hang up VBScript (nohup for VBScript) gimme_this_gimme_that VB Script 3 28 Oct 2008
WebRequest POST XMLDOM Not XMLDOM.xml Dave Harkness .NET General 1 14 Mar 2008