Fore more QTP Realtime scripts, visit www.ramupalanki.com

Dim description, filepath
Set xmlDoc1 = CreateObject(“Msxml2.DOMDocument”)
xmlDoc1.load(“C:Documents and Settingsmohan.kakarlaDesktop1.xml”)’file 1
Set xmlDoc2 = CreateObject(“Msxml2.DOMDocument”)
xmlDoc2.load(“C:Documents and Settingsmohan.kakarlaDesktop2.xml”)’file 2
Set ElemList1= xmlDoc1.DocumentElement.ChildNodes
Set ElemList2= xmlDoc2.DocumentElement.ChildNodes
If ElemList1.length=ElemList2.length Then’ check weather both xml file has same
number of childnodes
msgbox “Both XML files have same number of Child nodes”

For i = 0 to ElemList1.length-1

If ElemList1.item(i).Text=ElemList2.item(i).Text Then
msgbox “child element:”&i &” is same in both XML files”
Else
msgbox “child element:”& i &” is not same in both XML files, In XML file 1, The
valueis:”&ElemList1.item(i).Text &” and In XML file 1, The value

is:”&ElemList2.item(i).Text
End If
Next

More Related Content

PPT
Pax Migration Ocs 23062008
PPTX
Codable routing
PPTX
Threads and Node.js
PPTX
Mule esb object_to_jackson_json
DOCX
Codes
TXT
New text document
PDF
File input output in Java
PDF
Elixir par
Pax Migration Ocs 23062008
Codable routing
Threads and Node.js
Mule esb object_to_jackson_json
Codes
New text document
File input output in Java
Elixir par

What's hot (18)

PPTX
Mule esb - How to convert from Json to Object in 5 minutes
PDF
Javascript foundations: Function modules
PDF
Latinoware
PDF
Python in the database
PPTX
Mule esb How to convert from Object to Json in 5 minutes
PDF
The Ring programming language version 1.5.2 book - Part 11 of 181
PDF
Sbt for mere mortals
PDF
React Spotlight 2018
PPTX
Validating a json in mule
PPTX
Al around ML 2017, Оксана Савенко, студентка НТУ имени Каразина
PDF
Omnibus database machine
PDF
Mastering the MongoDB Shell
PPTX
Intro to mongodb mongouk jun2010
DOCX
Week 1 assignment q2
PPTX
Jafka guide
PPTX
No More Deadlocks; Asynchronous Programming in .NET
PDF
Searched gems which supports only ruby 2.6
PDF
Streaming using Kafka Flink & Elasticsearch
Mule esb - How to convert from Json to Object in 5 minutes
Javascript foundations: Function modules
Latinoware
Python in the database
Mule esb How to convert from Object to Json in 5 minutes
The Ring programming language version 1.5.2 book - Part 11 of 181
Sbt for mere mortals
React Spotlight 2018
Validating a json in mule
Al around ML 2017, Оксана Савенко, студентка НТУ имени Каразина
Omnibus database machine
Mastering the MongoDB Shell
Intro to mongodb mongouk jun2010
Week 1 assignment q2
Jafka guide
No More Deadlocks; Asynchronous Programming in .NET
Searched gems which supports only ruby 2.6
Streaming using Kafka Flink & Elasticsearch
Ad

Viewers also liked (20)

DOCX
Saltos cristian historia
PPTX
PPTX
αξιοποίηση ψηφιακών τεχνολογιών
PPT
Kuldvillak VESI
PDF
Psicologia del color zulay calle
PDF
Nivelaciones finales septimo 2011
PPT
ΠΟΛΥΔΟΥΡΗ ΜΑΡΙΑ
DOC
Hoja de reflexión 3
DOCX
Saltos cristian evaluacion de recuperacion (1)
PPTX
Presentaciones audiovisuales
PPTX
Construtores Java
PPT
ποιήματα για την_ποίηση
PDF
Sincronizacion con vacuometro
PPTX
El romanticismo
PPT
21 25 mars
PPT
28 février agenda
PPTX
1er departamental
DOCX
Manual de instalación de office
DOC
F9201027 hoja de vida aprendiz
Saltos cristian historia
αξιοποίηση ψηφιακών τεχνολογιών
Kuldvillak VESI
Psicologia del color zulay calle
Nivelaciones finales septimo 2011
ΠΟΛΥΔΟΥΡΗ ΜΑΡΙΑ
Hoja de reflexión 3
Saltos cristian evaluacion de recuperacion (1)
Presentaciones audiovisuales
Construtores Java
ποιήματα για την_ποίηση
Sincronizacion con vacuometro
El romanticismo
21 25 mars
28 février agenda
1er departamental
Manual de instalación de office
F9201027 hoja de vida aprendiz
Ad

Similar to Qtp compare xml files (20)

PPT
Sqlxml vs xquery
PPTX
java API for XML DOM
PPT
PPTX
06 xml processing-in-.net
PPTX
The xml
PPT
DOCX
Inventory program in mca p1
PPT
PPT
Xml Presentation-1
DOC
File System Operations
PDF
Advanced Web Programming Chapter 12
PPTX
PDF
C# Advanced L03-XML+LINQ to XML
PPS
04 sm3 xml_xp_07
PPT
Tech talk
TXT
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
PPT
Xml processing-by-asfak
PPTX
Xml session
PPTX
Xml writers
Sqlxml vs xquery
java API for XML DOM
06 xml processing-in-.net
The xml
Inventory program in mca p1
Xml Presentation-1
File System Operations
Advanced Web Programming Chapter 12
C# Advanced L03-XML+LINQ to XML
04 sm3 xml_xp_07
Tech talk
Tipo virus espia con esto aprenderan a espiar a personas etc jeropas de mrd :v
Xml processing-by-asfak
Xml session
Xml writers

More from Ramu Palanki (20)

DOC
Qtp sample certification questions and answers
DOC
Qtp realtime scripts
DOC
Qtp questions and answers
PPT
Qtp presentation
DOC
Qtp material for beginners
DOC
Qtp interview questions
DOC
Qtp interview questions and answers
DOC
Qtp interview questions3
DOC
Qtp complete guide for all
DOC
Qtp compare two xml files
DOC
Qtp change excel cell color with condition
DOCX
Qtp certification questions
DOCX
Qtp certification questions and tutorial
DOCX
Qtp certification questions2
DOCX
Qtp best tutorial
DOC
Qtp basic stuff
DOC
Qtp automation estimation techniques
DOC
Qtp 11 new enhacements in
DOC
Qtp sample resume
DOCX
Qtp passing parameters between actions
Qtp sample certification questions and answers
Qtp realtime scripts
Qtp questions and answers
Qtp presentation
Qtp material for beginners
Qtp interview questions
Qtp interview questions and answers
Qtp interview questions3
Qtp complete guide for all
Qtp compare two xml files
Qtp change excel cell color with condition
Qtp certification questions
Qtp certification questions and tutorial
Qtp certification questions2
Qtp best tutorial
Qtp basic stuff
Qtp automation estimation techniques
Qtp 11 new enhacements in
Qtp sample resume
Qtp passing parameters between actions

Qtp compare xml files

  • 1. Fore more QTP Realtime scripts, visit www.ramupalanki.com Dim description, filepath Set xmlDoc1 = CreateObject(“Msxml2.DOMDocument”) xmlDoc1.load(“C:Documents and Settingsmohan.kakarlaDesktop1.xml”)’file 1 Set xmlDoc2 = CreateObject(“Msxml2.DOMDocument”) xmlDoc2.load(“C:Documents and Settingsmohan.kakarlaDesktop2.xml”)’file 2 Set ElemList1= xmlDoc1.DocumentElement.ChildNodes Set ElemList2= xmlDoc2.DocumentElement.ChildNodes If ElemList1.length=ElemList2.length Then’ check weather both xml file has same number of childnodes msgbox “Both XML files have same number of Child nodes” For i = 0 to ElemList1.length-1 If ElemList1.item(i).Text=ElemList2.item(i).Text Then msgbox “child element:”&i &” is same in both XML files” Else msgbox “child element:”& i &” is not same in both XML files, In XML file 1, The valueis:”&ElemList1.item(i).Text &” and In XML file 1, The value is:”&ElemList2.item(i).Text End If Next