Wiki source for CommandXcmp

Show raw source

======Command xcmp======

**xcmp** compares 2 files either as xml equality or by binary comparison.

xcmp [-x] [-b] [-c] [-p] [-n] file1 file2

Compares 2 files either as xml equality or by binary comparison.

||-x|| Indicates an XML comparison||
||-b|| Indicates to ignore blank line distinctions (\r vs \c\n)||
||-c|| Indicates to ignore comments||
||-p|| Indicates to ignore processing instructions||
||-n|| Do not print any errors, just exit with the status code||

====Return Value====
Returns 0 if the files are considered identical, 1 otherwise.

====Binary Compare====
If -x is not specified then a binary comparison is done, terminating on the first non-identical byte.
If -b is specified then \r and \n\r are considered equal for binary comparisons. (For DOS / Unix compatibility )

====XML Compare====
If -x is specified then the files are compared for XML equivilence.
Equivilence is determined by comparing the parsed XML file as representing an equivilent XML document. Attribute order is not considered, element order is considered. Namespace URI's are compared (not namespace prefixes). Comment, Character and CDATA sections are compared for string equality.

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki