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.

<code>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) </code>

case 2: Compares all nodes and does not generate report file and log file.

<code>compareOptions.ReportFile = None; compareOptions.FilterFile = None; compareOptions.LogFile = None; CompareXmlFiles(“fileOne.xml”, “fileTwo.xml”, compareOptions) </code>

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. -------------------------------------

Getter Method Signature FilterFile()

Returns:
Return type:str

-------------------------------------

Setter Method

Signature FilterFile(value)

Parameters:value (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. -------------------------------------

Getter Method Signature ReportFile()

Returns:
Return type:str

-------------------------------------

Setter Method

Signature ReportFile(value)

Parameters:value (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. -------------------------------------

Getter Method Signature LogFile()

Returns:
Return type:str

-------------------------------------

Setter Method

Signature LogFile(value)

Parameters:value (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. -------------------------------------

Getter Method Signature IgnoreNamespaces()

Returns:
Return type:bool

-------------------------------------

Setter Method

Signature IgnoreNamespaces(value)

Parameters:value (bool) –

IgnoreUnmatchedNodes

XmlComparatorOptions_Struct.IgnoreUnmatchedNodes

Ignores unmatched nodes in comparison.

Default is false. -------------------------------------

Getter Method Signature IgnoreUnmatchedNodes()

Returns:
Return type:bool

-------------------------------------

Setter Method

Signature IgnoreUnmatchedNodes(value)

Parameters:value (bool) –

IgnoreComments

XmlComparatorOptions_Struct.IgnoreComments

Ignores comment nodes in comparison.

Default is false. -------------------------------------

Getter Method Signature IgnoreComments()

Returns:
Return type:bool

-------------------------------------

Setter Method

Signature IgnoreComments(value)

Parameters:value (bool) –

IgnoreCdata

XmlComparatorOptions_Struct.IgnoreCdata

Ignores CDATA nodes in comparison.

Default is false. -------------------------------------

Getter Method Signature IgnoreCdata()

Returns:
Return type:bool

-------------------------------------

Setter Method

Signature IgnoreCdata(value)

Parameters:value (bool) –

IgnorePI

XmlComparatorOptions_Struct.IgnorePI

Ignores processing instruction nodes in comparison.

Default is false. -------------------------------------

Getter Method Signature IgnorePI()

Returns:
Return type:bool

-------------------------------------

Setter Method

Signature IgnorePI(value)

Parameters:value (bool) –