XmlComparator Class¶
-
class
NXOpen.Validate.
XmlComparator
¶ Bases:
object
Provides a generic comparator for finding differences between two XML format files. The comparator takes
NXOpen.Validate.XmlComparatorOptions_Struct
to further control the comparison process. It returnsNXOpen.Validate.XmlComparatorResult
, and generates report of detailed differences in HTML file which can be viewed via web browser.To obtain an instance of this class, refer to
NXOpen.Session
New in version NX6.0.2.
Methods¶
Method | Description |
---|---|
CompareXmlFiles | Compares two xml format files. |
Enumerations¶
XmlComparatorResult Enumeration | Specifies result of the comparison |
Structs¶
XmlComparatorOptions_Struct Struct | <para>Represents config options in comparison</para> <para>For example:</para> <para>case 1: Defines filter file to control what nodes will be compared; generates comparison report and log; ignores CDATA and processing instruction nodes. |
Method Detail¶
CompareXmlFiles¶
-
XmlComparator.
CompareXmlFiles
¶ Compares two xml format files.
You can use :py:class:`NXOpen.Validate.XmlComparatorOptions_Struct`to customize the comparison process.
Signature
CompareXmlFiles(workXmlFile, masterXmlFile, compareOptions)
Parameters: - workXmlFile (str) – The first xml file to be compared
- masterXmlFile (str) – The second xml file to be compared against
- compareOptions (
NXOpen.Validate.XmlComparatorOptions_Struct
) – comparison options
Returns: comparison result
Return type: New in version NX6.0.2.
License requirements: None.