XmlComparatorOptions_Struct Struct¶
NXOpen.Validate.XmlComparator.Options is an alias for NXOpen.Validate.XmlComparatorOptions_Struct
-
class
NXOpen.Validate.
XmlComparatorOptions_Struct
¶ Bases:
object
Represents config options in comparison
For example:
case 1: Defines filter file to control what nodes will be compared; generates comparison report and log; ignores CDATA and processing instruction nodes.
compareOptions.ReportFile = “auto_report.html”; compareOptions.FilterFile = “filter.xml”; compareOptions.LogFile = “log.log”; compareOptions.IgnoreNamespaces = FALSE; compareOptions.IgnoreUnmatchedNodes = FALSE; compareOptions.IgnoreComments = FALSE; compareOptions.IgnoreCdata = TRUE; compareOptions.IgnorePI = TRUE; CompareXmlFiles(“fileOne.xml”, “fileTwo.xml”, compareOptions)
case 2: Compares all nodes and does not generate report file and log file.
compareOptions.ReportFile = None; compareOptions.FilterFile = None; compareOptions.LogFile = None; CompareXmlFiles(“fileOne.xml”, “fileTwo.xml”, compareOptions)
. Constructor: NXOpen.Validate.XmlComparator.Options()
Fields¶
Field | Description |
---|---|
FilterFile | File specification of filter file. |
ReportFile | File specification of report file. |
LogFile | File specification of comparison log file. |
IgnoreNamespaces | Ignores namespace definition during comparison. |
IgnoreUnmatchedNodes | Ignores unmatched nodes in comparison. |
IgnoreComments | Ignores comment nodes in comparison. |
IgnoreCdata | Ignores CDATA nodes in comparison. |
IgnorePI | Ignores processing instruction nodes in comparison. |
FilterFile¶
-
XmlComparatorOptions_Struct.
FilterFile
¶ File specification of filter file.
The filter file defines what nodes will be compared and how to compare them. It can be None, which means all nodes will be compared.
-------------------------------------
Field Value Type:str
ReportFile¶
-
XmlComparatorOptions_Struct.
ReportFile
¶ File specification of report file.
The report file contains the detail comparison results. It can be None, which means the comparator won’t generate a report file.
-------------------------------------
Field Value Type:str
LogFile¶
-
XmlComparatorOptions_Struct.
LogFile
¶ File specification of comparison log file.
The log file contains detail comparison steps and comparison information. It can be None, which means the comparator won’t generate a log file.
-------------------------------------
Field Value Type:str
IgnoreNamespaces¶
-
XmlComparatorOptions_Struct.
IgnoreNamespaces
¶ Ignores namespace definition during comparison.
But if the filter file has namespace definition, the comparator will ignore this option and always compare the nodes with namespace definitions. Default if false.
-------------------------------------
Field Value Type:bool
IgnoreUnmatchedNodes¶
-
XmlComparatorOptions_Struct.
IgnoreUnmatchedNodes
¶ Ignores unmatched nodes in comparison.
Default is false.
-------------------------------------
Field Value Type:bool
IgnoreComments¶
-
XmlComparatorOptions_Struct.
IgnoreComments
¶ Ignores comment nodes in comparison.
Default is false.
-------------------------------------
Field Value Type:bool