Maybe i don“t understand your question because my english is very bad, but i
will try help you. I compare 2 files with this function:
--------------------------------------------------------------------------
Function FCompareFilesXML (file1, file2)
Dim compare, result
Set XMLObj1 = XMLUtil.CreateXMLFromFile(file1)
Set XMLObj2 = XMLUtil.CreateXMLFromFile(file2)
result = XMLObj1.Compare(XMLObj2,compare ,1+2+4)
If result = 1 Then
Reporter.ReportEvent micPass, "Verificar listado","Los ficheros son
iguales"
Else
Reporter.ReportEvent micFail,"Verificar listado","Los ficheros NO
son iguales"
End If
End Function
----------------------------------------------------------------------------
In your case I think that you can use:
result = XMLObj1.Compare(XMLObj2,compare , 2)
----------------------------------------------------------------------------
*XMLData**.Compare(**XMLDocument**, **ResultXMLDocument [, Filter]**) *
Argument
Type
Description
*XMLDocument*
XMLData
The XML document object that you want to compare to this XMLData object.
*ResultXMLDocument*
XMLData
An XMLData object containing the differences between the XMLData object and
the XML document specified in the XMLDocument argument, according to the
specified Filter argument (if any).
*Filter*
Number or pre-defined constant
*Optional. *The XML DOM node information to be compared:
*0 *or* micXMLNone*: Compares the elements and document type declaration of
the specified XML documents.
*1 *or* micXMLAttributes:* Compares the attributes of the specified XML
documents, in addition to their elements and document type declaration.
*2 *or* micXMLCDataSections*: Compares the CDATA sections of the specified
XML documents, in addition to their elements and document type declaration.
*4 *or* micXMLValues*: Compares the #text nodes of the specified XML
documents, in addition to their elements and document type declaration.
*Note:* If you do not use this parameter, the Document Type Declaration,
Elements, Attributes, #text nodes, and CDATA sections are all compared.
You can specify more than one filter, separated by a plus (*+*) symbol. For
example, micXMLValues+micXMLAttributes.
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en