I am using QTP's XMLUtil to compare 2 xmls. Everything works fine except if there are any differences in tag elements. For example,
In XML1, the tag is:
<DirtyBondPrice PriceType="Price" Currency="GBP" Weight1="02">110</DirtyBondPrice>
In XML2, the tag is
<DirtyBondPrice PriceType="Price" Currency="USD" Weight1="02">110</DirtyBondPrice>
Code snippet
booleanResult = objXML1.Compare(objXML2, objResultsXML)
objResultsXML.SaveFile "C:\Users\pankaj.jaju\Desktop\6.xml"
So the difference is show as follows
<mic_root state="mismatch">
<RepoTrade state="mismatch">
<SpecificDetail state="mismatch">
<DirtyBondPrice mic_elemA_attr="%s="%s";%s="%s"" mic_elemB_attr="%s="%s";%s="%s"" state="mismatch" />
</SpecificDetail>
</RepoTrade>
</mic_root>
What I was expecting (and according to QTP help file what should be displayed):
<DirtyBondPrice mic_elemA_attr="Currency="GBP"" mic_elemB_attr="Currency="USD"" state="mismatch" />
Is this a bug in QTP's XMLUtil API?
Aucun commentaire:
Enregistrer un commentaire