Description
The ccollab admin review-xml
command allows you to export the specified reviews to XML format. Additionally, you may specify an XPath expression to evaluate against the resulting XML, or specify an XSL file to post-process the XML.
Command Line Syntax
ccollab [global-options] admin review-xml [--xpath <value>] [--xsl-file <value>] <review> [<review> ...]
Command Options
Option |
Required? |
Description |
---|---|---|
No |
XPath expression to evaluate against XML |
|
No |
XSL file to use to post-process XML, or '-' to read XSL from STDIN |
|
Yes |
Reviews to dump to XML. Identifier of the desired review (an integer number), or an
|
Examples
Output 'last' review to console:
ccollab admin review-xml last
Export reviews 1234 and 1354 to XML file:
ccollab admin review-xml 1234 1354 > reviews.xml
Export reviews 1234 and 1354 to HTML file by applying XSL post-processing:
ccollab admin review-xml --xsl-file ToHTML.xsl 1234 1354 > reviews.html
Get ID of 'last' review:
ccollab admin review-xml last --xpath string(//reviews/review/@reviewId)
Get title of review 1354:
ccollab admin review-xml 1354 --xpath //reviews/review/general/title/text()
Get number of defects in review 2478 with 'Major' severity:
ccollab admin review-xml 2478 --xpath count(//reviews/review/defects/defect[custom-defect-fields/severity='Major'])
Remarks
- On Windows, you must enclose the file path and XPath arguments in quotes:
ccollab admin review-xml 43 --xpath "//reviews/review/participants/participant[role='Author']"
- To post-process the generated XML file, you may use the ToHTML.xsl sample XSL stylesheet (CTRL + click, or CMD + click to open in new window), or apply your own XSL stylesheet.
- For XSL transformation, this command uses the standard JRE XSLT processor, by default. Currently, standard JRE XSLT processor supports only XSLT 1.0 transformations. To use XSLT 2.0 or XSLT 3.0 transformations you will need to install Saxon XSLT processor (or another third-party XSLT processor) and setup it as the default XSLT processor in JRE as described here.