NX Open C++ Reference Guide
Public Member Functions | Public Attributes | List of all members
NXOpen::Validate::XmlComparator::Options Struct Reference


Represents config options in comparison

For example:
More...

Public Member Functions

 Options (const NXString &filterFileInitial, const NXString &reportFileInitial, const NXString &logFileInitial, bool ignoreNamespacesInitial, bool ignoreUnmatchedNodesInitial, bool ignoreCommentsInitial, bool ignoreCdataInitial, bool ignorePIInitial)
 Constructor for the Options struct. More...
 

Public Attributes

NXString FilterFile
 File specification of filter file. More...
 
bool IgnoreCdata
 Ignores CDATA nodes in comparison. More...
 
bool IgnoreComments
 Ignores comment nodes in comparison. More...
 
bool IgnoreNamespaces
 Ignores namespace definition during comparison. More...
 
bool IgnorePI
 Ignores processing instruction nodes in comparison. More...
 
bool IgnoreUnmatchedNodes
 Ignores unmatched nodes in comparison. More...
 
NXString LogFile
 File specification of comparison log file. More...
 
NXString ReportFile
 File specification of report file. More...
 

Detailed Description


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 = NULL;
compareOptions.FilterFile = NULL;
compareOptions.LogFile = NULL;
CompareXmlFiles("fileOne.xml", "fileTwo.xml", compareOptions)

Constructor & Destructor Documentation

NXOpen::Validate::XmlComparator::Options::Options ( const NXString filterFileInitial,
const NXString reportFileInitial,
const NXString logFileInitial,
bool  ignoreNamespacesInitial,
bool  ignoreUnmatchedNodesInitial,
bool  ignoreCommentsInitial,
bool  ignoreCdataInitial,
bool  ignorePIInitial 
)

Constructor for the Options struct.

Parameters
filterFileInitialFile specification of filter file. The filter file defines what nodes will be compared and how to compare them. It can be NULL, which means all nodes will be compared.
reportFileInitialFile specification of report file. The report file contains the detail comparison results. It can be NULL, which means the comparator won't generate a report file.
logFileInitialFile specification of comparison log file. The log file contains detail comparison steps and comparison information. It can be NULL, which means the comparator won't generate a log file.
ignoreNamespacesInitialIgnores 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.
ignoreUnmatchedNodesInitialIgnores unmatched nodes in comparison. Default is false.
ignoreCommentsInitialIgnores comment nodes in comparison. Default is false.
ignoreCdataInitialIgnores CDATA nodes in comparison. Default is false.
ignorePIInitialIgnores processing instruction nodes in comparison. Default is false.

Member Data Documentation

NXString NXOpen::Validate::XmlComparator::Options::FilterFile

File specification of filter file.

The filter file defines what nodes will be compared and how to compare them. It can be NULL, which means all nodes will be compared.

bool NXOpen::Validate::XmlComparator::Options::IgnoreCdata

Ignores CDATA nodes in comparison.

Default is false.

bool NXOpen::Validate::XmlComparator::Options::IgnoreComments

Ignores comment nodes in comparison.

Default is false.

bool NXOpen::Validate::XmlComparator::Options::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.

bool NXOpen::Validate::XmlComparator::Options::IgnorePI

Ignores processing instruction nodes in comparison.

Default is false.

bool NXOpen::Validate::XmlComparator::Options::IgnoreUnmatchedNodes

Ignores unmatched nodes in comparison.

Default is false.

NXString NXOpen::Validate::XmlComparator::Options::LogFile

File specification of comparison log file.

The log file contains detail comparison steps and comparison information. It can be NULL, which means the comparator won't generate a log file.

NXString NXOpen::Validate::XmlComparator::Options::ReportFile

File specification of report file.

The report file contains the detail comparison results. It can be NULL, which means the comparator won't generate a report file.


The documentation for this struct was generated from the following file:
Copyright 2017 Siemens Product Lifecycle Management Software Inc. All Rights Reserved.