Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


comparing two XML's using XMLDOM, VBscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63589
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> comparing two XML's using XMLDOM, VBscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 comparing two XML's using XMLDOM, VBscript - 8/18/2008 2:38:59 PM   
  gopi9999

 

Posts: 2
Score: 0
Joined: 8/18/2008
Status: offline
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. 




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


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 in  advance.

- thanks
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> comparing two XML's using XMLDOM, VBscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts